4

Is there a way to add hotkeys (such as the media buttons) for the webbrowser?

This would need to cause a javascript event.

I except a firefox extension is required and i am ok if the solution requires greasemonkey as well (i seen growl use them both for javascript interaction. But thats javascript->pc not the other way around)

-edit- is this not possible ATM?

Jon Winstanley
  • 23,010
  • 22
  • 73
  • 116
  • You mean, independently from the page the user is on? – Pekka Jan 12 '11 at 11:45
  • @Pekka: independently would be nice. But if it wasnt i wouldnt mind. –  Jan 12 '11 at 20:47
  • 1
    well, you can define hotkeys inside a page e.g. using the jQuery hotkeys plugin, but they will cease to work once you leave the page. Is that acceptable? – Pekka Jan 12 '11 at 20:50
  • +1 cause it helped. I googled and found test-static-08 which shows me i can use play/pause/etc. Now once some plugin allows firefox to see those keys i'll be all set –  Jan 12 '11 at 21:11
  • vlc has an option to add global hotkeys irrespective of what is focused, combine that with the fact that you can stream video/audio from youtube and such and that might work for a few options, to act as 'global "media buttons"'. – jtzero Aug 26 '11 at 17:00

1 Answers1

2

Firefox supports something called an AppCommand event. On Windows and Linux, only 7 commands are supported: Back, Forward, Reload, Stop, Search, Bookmarks and Home.

To implement extra commands, supported would have to be added to widget/src/windows/nsWindow.cpp and widget/src/gtk2/nsWindow.cpp to generate those additional types of AppCommand event. These events could then be intercepted by an extension to perform custom actions.

On Android, a different set of events are supported: Clear, VolumeUp, VolumeDown, Menu, Search. I don't know whether these events are used by Fennec.

For completeness, OS/2 builds of Firefox support Back, Forward, Reload and Stop.

Neil
  • 54,642
  • 8
  • 60
  • 72