Bug 492557: Brainstorming

James Hobin hobinjk at MIT.EDU
Wed Oct 2 03:33:49 UTC 2013


Hi everyone!

I'm James Hobin, a student currently working on bug 492257 (create a
keyboard shortcut HUD). I have run into the sad issue that at least a few of
the keyboard shortcuts are implemented in particularly hacky ways that don't
play well with anything. For example, "Next tab group":

          if (event.ctrlKey && !event.metaKey && !event.altKey &&
               (charCode == 96 || charCode == 126)) {

The way I see it there are a few different ways to go about fixing this.
I am contacting this list because I want this feature to be implemented
properly without causing any future headaches. My best idea so far is to
go to every undocumented keyboard shortcut and turn it into a proper set
of <key>, <command>, and <menuitem> elements. This will introduce quite
a few locale-specific strings (which should have already been translated
for the SUMO page). The biggest wins for this approach are allowing
every keyboard shortcut to be locale-specific (for example, French
keyboards make Ctrl-` not make any sense), paving the way for an
official keyboard shortcut rebinding mechanism, and reducing code
inconsistency. I'm most concerned that adding all of this will somehow
decrease performance or increase memory usage.

As people more experienced with the Mozilla codebase, do you have any
feedback or comments on my implementation plans?

Best,
Jame



More information about the firefox-dev mailing list