Page 1 of 1

Re: Firefox 66 shows many strange hotkeys to customize

Posted: Sun Jan 20, 2019 2:46 pm
by DaveG
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.

Re: Firefox 66 shows many strange hotkeys to customize

Posted: Wed Mar 20, 2019 12:51 am
by DaveG
Any update: Mozilla is incompetent and did not bother to fix this before the final Firefox 66 release. There is nothing I can do about this. At least it's buried in the gear icon menu. :sigh:

Firefox 67 looks like it's getting minor improvements to it to be a bit less sloppy, but it still shows non-existent shortcuts.