Firefox 66 shows many strange hotkeys to customize

Any feedback, suggestion, bug reports, problems....
Post Reply
Posts: 2
Joined: Sat Jan 13, 2018 3:39 pm

Firefox 66 shows many strange hotkeys to customize

Post by rugk » Sat Jan 19, 2019 1:35 pm

In case you did not know already, Firefox 66 now allows you to customize the hotkeys of extensions.[1][2]

However, as for this extension it does show a lot of strange hotkeys, i.e. ones labelled 1 to 99 and one "?":

That looks kinda confusing.

[2] (German) ... rt-werden/



User avatar
Flagfox Developer
Posts: 718
Joined: Wed Oct 03, 2007 9:06 pm
Location: Philadelphia, USA

Re: Firefox 66 shows many strange hotkeys to customize

Post by DaveG » Sun Jan 20, 2019 2:46 pm

Flagfox has had the ability to set custom hotkeys for all actions for about 9 years. (since Flagfox 4.0 in Feb 2010) When Mozilla set the addon universe on fire with the mandatory switch to the WebExtension API a bit over a year ago (Nov 2017), they did so without fully implementing many longstanding capabilities, only slowly adding a few things back piecemeal, and only over the past half year. For about 7 months after the old APIs were banned, no keyboard shortcut customization API existed at all; it was impossible to do in Firefox 57-59. Firefox 60 (May 2018) FINALLY got an API to change a keyboard binding, though just that; there's no API to check if a potential binding is valid or otherwise in use. This was enough for me to be able to re-implement hotkeys in Flagfox 6.1 (July 2018), however I had to do lots of futzing to make it work. It's not a good API. What you can see in your screenshot is the result of one of Mozilla's poor decisions in creating their API for this. Simply put, the API only allows changing an existing binding, not actually creating new ones. It just explodes if you try and do something obvious like let a user create their own action and set a hotkey for it. The only way to handle this is pretty simple: just pre-define a pool of empty hotkey bindings and then re-assign them as needed. I just went with a big round number of 100 plus the "?" one used exclusively for test-setting hotkeys from the options to see if they're valid at all.

Seeing as the keyboard binding definitions are completely empty, and only exist to workaround Mozilla's deficient API, as far as I'm concerned, this is a Mozilla bug. If they're going to add a GUI to edit addon shortcuts half a damned year late after adding an API to update addon shortcuts half a year late, they should make it not show this cruft.

TL;DR: This is a Firefox bug. Flagfox keyboard shortcut customization is done from the Flagfox options page, so use that. Hopefully Mozilla will clean this up prior to release. If they don't fix it, there's nothing I can do on my end.

I'll also explain this in Firefox's Bugzilla so they can be made aware, if not already.

Thank you for reporting this.

Post Reply