Firefox supports something called the AppCommand event. On Windows and Linux, only 7 commands are supported: Back, Forward, Reload, Stop, Search, Bookmarks and Home.
To implement additional commands, the supported ones must be added to widget/src/windows/nsWindow.cpp and widget/src/gtk2/nsWindow.cpp to create additional types of AppCommand events. These events can then be intercepted by the extension to perform custom actions.
Android supports a different set of events: Clear, VolumeUp, VolumeDown, Menu, Search. I do not know if these events are used by Fennec.
To complete OS / 2, Firefox builds support Back, Forward, Reload, and Stop.
source share