Shortcut keys are hard · 2008-03-24 00:44 by Wladimir Palant
When I wrote the first Adblock Plus version two years ago, I already knew that keyboard shortcuts are trouble. Using a “simple” keyboard shortcut like Ctrl+B was pretty much impossible — basically all these keys were already in use by the browser. Yet most of the more complicated “Ctrl+Shift+…” shortcut keys were still free and could be used by extensions. Of course, all extensions shared the same browser window and would eventually clash with their shortcut key definitions, but one could expect that to happen on relatively rare occasions (and the shortcut keys were made configurable just for that reason). Still, I decided to use only two shortcut keys to reduce the probability of issues — original Adblock extension had five. And for two years Adblock Plus answered to Ctrl+Shift+A and Ctrl+Shift+B.
First trouble came when I added support for Thunderbird, if you dig deep enough in its menus you will find that Ctrl+Shift+A is reserved for “Select thread.” I decided to ignore the problem, it just wasn’t reason enough to change the shortcut key for everybody. But now Firefox 3 is about to be released and I am really in trouble. People already started complaining that Ctrl+Shift+B is now occupied by the “Organize Bookmarks” function. At the same time, Ctrl+Shift+H shortcut used by the Element Hiding Helper extension is taken by “Show All History,” so it looks like I have to change all shortcuts.
Looking through all menus searching for shortcut keys is painful, so I wrote a simple script to do the job. With its help I could compile the following table:
|Firefox 2||Firefox 3 (nightly)||SeaMonkey 1.1||SeaMonkey 2.0 (nightly)||Thunderbird 2/Thunderbird 3 (nightly)||Songbird 0.5 (RC2)|
Note 1: eMusic Remote is missing because it doesn’t have any predefined “Ctrl+Shift” keys at all.
Note 2: Ctrl+Shift+N and Ctrl+Shift+Q are grayed out because the corresponding Mac keys (Command+Shift+N and Command+Shift+Q) have a special meaning on Mac OS X.
Note 3: Ctrl+Shift+Z is grayed out because this shortcut key is associated with the “Redo” operation in the WYSIWYG editor.
This doesn’t exactly leave me much choice, and getting the new shortcut keys in some relation to their function will be hard. I think I will go with Ctrl+Shift+E for Adblock Plus Preferences, this has to do with editing after all. And maybe Ctrl+Shift+V for the list of blockable elements, it has to do with viewing. Element Hiding Helper should be served with Ctrl+Shift+K, “kill” maybe? And I think I will stay with Ctrl+Shift+M for the yet to be released Adblock Plus Watcher extension — sorry, Thunderbird.
Now could you guys all stand back and let me use these keys without conflicts?
Commenting is closed for this article.