Does anybody know how can I add a shorcut key in a restartless Firefox addon? I mean without using SDK. I tried to add a element to the "mainKeyset". The key is added on install but its function triggers only after restart.
Asked
Active
Viewed 95 times
1 Answers
1
GitHub :: Noitidart/_ff-addon-demo-BootstrapHotkey i made this based on this topic here: firefox add-on shortcut does not work anymore
You have to make your own keyset instead of adding to mainKeyset because key liseteners are connected when keyset is appended to document. per the topic linked above
That demo addon ads Ctrl+F12 as a hotkey to all windows, including view source etc etc. Its actually very agressive, pressing Ctrl+F12 opens an alert, and in that alert this hotkey is available as well. So youll get the alert to spawn an alert if u press the hotkye. fun stuff.