Adblock Plus and (a little) more
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) | |
---|---|---|---|---|---|---|
Ctrl+Shift+A | X | |||||
Ctrl+Shift+B | X | |||||
Ctrl+Shift+C | X | |||||
Ctrl+Shift+D | X | X | X | X | ||
Ctrl+Shift+E | ||||||
Ctrl+Shift+F | X | |||||
Ctrl+Shift+G | X | X | X | X | X | |
Ctrl+Shift+H | X | |||||
Ctrl+Shift+I | X | X | ||||
Ctrl+Shift+J | X | X | ||||
Ctrl+Shift+K | ||||||
Ctrl+Shift+L | X | X | ||||
Ctrl+Shift+M | X | |||||
Ctrl+Shift+N | ||||||
Ctrl+Shift+O | ||||||
Ctrl+Shift+P | ||||||
Ctrl+Shift+Q | ||||||
Ctrl+Shift+R | X | X | X | X | X | X |
Ctrl+Shift+S | X | X | ||||
Ctrl+Shift+T | X | X | X | X | ||
Ctrl+Shift+U | X | |||||
Ctrl+Shift+V | ||||||
Ctrl+Shift+W | X | X | X | X | ||
Ctrl+Shift+X | X | X | X | X | ||
Ctrl+Shift+Y | ||||||
Ctrl+Shift+Z |
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?
Comment [25]
Commenting is closed for this article.
mconnor · 2008-03-24 01:35 · #
Of course not… haven’t you heard that Firefox developers hate extension authors? And freedom? And kittens?
Reply from Wladimir Palant:
I knew it! I knew it! :)
But really, I wonder whether there is some solution for this problem. Right now it seems that having keyboard shortcuts in an extension is bad choice, but without them you cannot have proper user experience.
Simon · 2008-03-24 02:30 · #
… and if the annoying warnings are to be believed, Ctrl+Shift+A to Ctrl+Shift+F aren’t available on GTK2 at all:
Warning: Key event not available on GTK2: key=“e” modifiers=“control shift”
Anyway, what’s wrong with using application specific shortcuts? Are there really that many people using ABP on all these applications so that making all of us relearning the shortcuts is unavoidable? Consistency may be good, but in this case it looks slightly overrated… ;-)
Reply from Wladimir Palant:
Right, I forgot about Linux composing Unicode characters with Ctrl+Shift+A to Ctrl+Shift+F. But that’s a problem I already ignored before.
Having different shortcut keys for different applications wouldn’t work at least for Firefox/Thunderbird – many people use both. Same goes for SeaMonkey/SeaMonkey Mail (btw, I forgot the latter in the table). And then the advantage of this approach is going to be very small – with the problem of defining application-specific preferences still to be solved.
Also, right now I can simply say in the forum “Press Ctrl+Shift+A and look at the list” – this will no longer be possible.
Frank (DesertFox) · 2008-03-24 03:24 · #
Yikes! I’m a big fan of your extension, but your new shortcut conflicts with the shortcut key for my extension: Add-ons Sidebar. My extension simply allows the add-ons to be opened in the sidebar, and that’s done with ctrl+shift+e.
Reply from Wladimir Palant:
Yes, not exactly unexpected with so few keyboard shortcuts there for taking.
IceDogg · 2008-03-24 05:17 · #
“And I think I will stay with Ctrl+Shift+M for the yet to be released Adblock Plus Watcher extension”
Have you released any info about this new extension. If so I’ve missed it. I’m very interested in what you’ve cooked up now. :)
I’m sorry to be off topic.. the shortcuts don’t matter to me all that much I’m to much of a mouse guy.
IceDogg · 2008-03-24 05:20 · #
Never mind my post above I found it via a search.. very sorry I didn’t search first. Testing it out now.
Sam Hasler · 2008-03-24 06:04 · #
Ctrl+Shift+e is also used by the Web Developer extension for editing CSS. I’m sure the other shortcuts are used by other extensions. (I know one is but it’s not worth mentioning, however I thought that Web Developer being pretty popular might be one to avoid clashing with.)
Maybe Firefox should start supporting Chord shortcuts where you press two combinations in a row for a shortcut like Visual Studio and the like.
Reply from Wladimir Palant:
That was to be expected – with so few free keyboard shortcuts there for taking. But I think we were conflicting with the Web Developer extension before as well.
Asrail · 2008-03-24 07:24 · #
On SM trunk:
Control+shift+B opens a sidebar for managing bookmarks.
Control+shift+N opens a new composer window.
Also Control+shift+U is not a nice idea, because it’s used on Linux to insert unicode symbols.
For instance:
Control+shift+U 2 7 1 3 [space]
inserts ✓, which is 0×2713.
Simon · 2008-03-24 11:21 · #
Do you really feel the need to have a shortcut for a preferences screen? I’m not familiar with the extension, but seems to me that if it’s hard finding non-conflicting shortcuts, it’s just being hypocritical attempting to reserve one for something as rarely used as a preferences screen.
Reply from Wladimir Palant:
Preferences screen is often used in Adblock Plus because it contains the list of filters. Unless you use a filter subscription in which case you don’t care about shortcut keys anyway.
Anne Nonnie Moose · 2008-03-25 20:24 · #
Re: the anonymous posting suggestion, wouldn’t “example.com” be more appropriate than mailinator.com for dumping mail? I mean, it’s reserved by IANA and everything. No reason to burden (or rely on) Mailinator if both parties don’t want the message to happen.
Of course, bless you for your amazing and essential extension. It changes lives.
On topic, aren’t you being a little hypocritical in asking “could you guys all stand back and let me use these keys without conflicts” and then essentially dismissing two other extension developers, posting above, who already use the keystrokes? Wouldn’t it be more cooperative on your part to try and pick other combos (as slim as the pickings might be)?
Even more importantly, perhaps can you make the key combos user-customizable (or perhaps they already are?) for those with preferences or extension conflicts.
By the way, as I’m rambling all over the place, I noted a serious problem installing ABP in Seamonkey under Vista, but you’re probably aware of it… Thanks again for your work.
Reply from Wladimir Palant:
The “please stand back” part is ironical – I know that nobody is going to stand back. With a total of 6 shortcut keys for taking, all extensions are going to clash, there is no way out. And browser changes are going to happen as well, those will hit us hard again. I just wanted to bring attention to this problem since I don’t see any solution myself. So far the only solution I have is disabling shortcut keys automatically if conflicts are found – at least this way we won’t break anybody, and we won’t show any shortcuts keys in the menu that don’t work.
And – yes, the shortcut keys are already customizable (http://adblockplus.org/en/faq_customization#shortcuts) yet requiring users to change shortcut keys is not going to work in the general case.
Reply from Wladimir Palant:
Oh, and on the topic of an anonymous reply email – I am not sure what example.com does with emails that get there. Some people already used anonymous@mailinator.com so I made it a recommendation – it is still better than x@x.com or something like this. I should change Textpattern to make sure it won’t send any mail to example.com – then I can tell everybody to use this address.
Reply from Wladimir Palant:
I just fixed that – no more mails sent to example.com. So recommending anonymous@example.com is safe now.
f0rqu3 · 2008-04-01 01:36 · #
I don’t hate you
Jim Clifford · 2008-04-04 22:10 · #
Would greatly appreciate a quick update to FF Beta 3.5 for Adblock Plus.
I know it’s only been 2 days but it’s making me nuts using FF without it.
Thanks.
Reply from Wladimir Palant:
Have a look at the development builds section: http://adblockplus.org/development-builds/
Len · 2008-04-07 18:12 · #
try ctl-shift-alt-b and ctl-shift-alt-a; not a lot more work, and very unlikely to be taken any time soon (thats what I’ve reconfigured mine to use on b5)
by the way, there appears to be a conflict with flashblock on b5, where flashblock gets priority and shows its “blocked” flash before adblock can remove them totally. or maybe its more – on woot.com I was seeing all sorts of google ads; no idea why (i’m using adblock with install.rdf hacked to allow 3b5, which it works fine with but ff won’t let me install). I confirmed this problem on ff3b4, so its not new in 3b5
Reply from Wladimir Palant:
Flashblock looks at the HTML – and Adblock Plus doesn’t change the HTML code. So there is no real way to resolve this “conflict”.
Pandu E Poluan · 2008-04-29 18:57 · #
Well, this may not be the solution you’re looking for, Wladimir. But I simply like to shuffle my shortcuts around… what with having 53 (at last count) extensions, you bet there will surely be clashes :)
So, I use the keyconfig extension. It’s rather old, but hey! It works :)
@Len: On Fx2 I use NoScript instead of FlashBlock, and I can remove flash ‘leftovers’ with <sitename>#embed. Does that not work on Fx3?
Jon Warren · 2008-05-14 08:43 · #
It’s taken me a while to get around to being frustrated by the conflict with Ctrl-Shift-E (web developer plugin’s edit css which I use nearly constantly) to take some time to look for a solution.
How about this as a simple config option. Provide a boolean for disabling all adblock plus related shortcut keys. That way, those of us that have conflicts could easily turn off the shortcut keys that never conflicted before a couple months ago.
Just a thought. Since I can’t seem to locate that option, nor can I figure out how to go about switching a shortcut that I don’t use to something that doesn’t conflict — same problem you had I’m sure — and I don’t quite feel like installing yet another extension (so the keyconfig suggestion isn’t quite what I’d like to go thru).
Reply from Wladimir Palant:
Adblock Plus provides more than a boolean option: http://adblockplus.org/en/faq_customization#shortcuts
However, I don’t think this is really a solution.
Web Developer · 2008-06-06 01:15 · #
Is there any way to turn of/reconfigure Ctrl+Shift+U ?
I haven’t found any property in about:config to do so.
Reply from Wladimir Palant:
What is Ctrl+Shift+U? There is no such shortcut key in Adblock Plus – and neither in Firefox.
Web Developer · 2008-06-11 02:17 · #
Hi Wladimir,
First of all I would like to say how much I like AdBlock plus and how happy I am because of what you do guys for the Internet community.
My issue is, that, since I have upgraded my FF2 to FF3 RC2 AdBlock took control over ctrl+shift+U shortcut and I can’t change it.
Ctrl+Shift+U is yet another shortcut used by Web Developer plugin. I hope you can Imagine how hard it makes all developers live especially for the ones who uses keyboard instead of the mouse to do certain actions. I used to press this combination at least 100 times a day.
As a temporary thing I moved WD shortcut to Ctrl+U but I really would like to restore previous situation without reinstalling or uninstalling anything.
Reply from Wladimir Palant:
That isn’t Adblock Plus. This shortcut key is used by Filterset.G Updater – and I everything but recommend using it (http://adblockplus.org/en/faq_project#filterset.g).
Web Developer · 2008-06-15 00:50 · #
Thanks Wladimir For Ur help!
:)
Alec_Burgess · 2008-06-18 12:24 · #
re the table you generated at the top of this page to show (I believe) keyboard shortcuts in use by the different Mozilla apps.
Do you know of any way (maybe yet-another-extension) that will ferret through the source of installed extensions to give the same chart by extension and-or a generic way to reassign those shortcuts.
AFAICT from: – <http://adblockplus.org/en/faq_customization#shortcuts>
you have to support that with code in your extension. Searching about:config for “_key” (a very sensible choice which might be recommended to all extension authors if there isn’t already such a recommendation) turns up only the four for adblockplus and for just “key” only 11 of type string (four of which are for gdirections which I haven’t yet got to work in Firefox 3 anyway). (I’ve currently only got 11 extensions installed but have a whole bunch more downloaded and ready for install a couple at a time in hopes I don’t break my Firefox!)
Reply from Wladimir Palant:
No, I don’t think you can do that for extensions – first because it is hard to tell which part of it applies to the browser window, and second because extensions often use non-standard ways of implementing shortcut keys (either because of inexperience or because they need to make the keys customizable). There was some extension that lets you redefine the shortcut keys but I don’t remember the name. And – no, the approach in my FAQ works only for Adblock Plus and the extensions based on it (Element Hiding Helper, Adblock Plus Watcher), other extensions either implement their own mechanisms for customization or don’t have this option at all.
daniel · 2009-04-13 08:16 · #
Do you think that CTRL, ALT, and SHIFT modifiers unnaturally limit the range of available shortcut keys? Sure, it’s probably easier to learn new applications—but each of these is used separately. The browser, on the other hand, is starting to look more like an operating system: when we it, we’re using a variety of applications (extensions) within the same environment.
I find it very useful to control Firefox through its Location Bar (e.g. custom keyword searches “d unknownword” will search dictionary.com for ‘unknownword’). What if you could control other aspects of Firefox and its extensions in a similar way? Imagine, instead of pressing CTRL+SHIFT+e to open the Preferences dialog and add a site, being able to type “ab + www.site.com” in the Location Bar?
The more extensions you have, the more shortcut keys you have to remember. Since the context remains the browser, it becomes hard to separate these shortcuts out in your mind, even when they do not overlap in the actual configuration. I use Adblock, but I also use Flashblock. If its developer(s) decided to use CTRL+SHIFT+e as the shortcut key to its configuration dialog, where would I be left as a user? Would Flashblock’s shortcut prevail because I installed it after Adblock? Would they conflict and cancel out? Would I have to choose to use one over the other? Would I create a new shortcut to resolve the conflict?
Instead of any of the above, I could control both extensions from the Location Bar. If there were a style guide developers followed, the controls might even be similar among various extensions (e.g. “ab + www.site.com” and “fb + www.site.com”).
Of course, there’s no reason that Location Bar commands are any easier to remember than keyboard shortcuts. To that end, the Location Bar can provide me with feedback as I type a command (e.g. using a partial match-like mechanism). I could type “ab” and immediately see a list of available commands for Adblock. If I didn’t remember the exact way to do what I want, seeing the list might help me remember.
If the above approach seems like overkill, what about having alphanumeric shortcut key modifiers? For example, all shortcut keys for Adblock could begin with ALT+a (in Firefox, this combination alone enables/disables “Highlight all” when the Find toolbar is open, but there are probably a number of ways to resolve this conflict—if another key is pressed at least so many milliseconds after ALT+a, the key will be caught by Adblock and not propogated through to Firefox’s Find toolbar).
Another way is to have a central mechanism for registering shortcuts. Think of it like a dictionary: Firefox and each extension provide a list of actions that can be bound to a key combination and the default key combination. When there’s a conflict, the user can resolve it: Maybe I hardly access Adblock’s configuration, but often find myself opening Flashback’s; I could disable Adblock’s CTRL+SHIFT+e shortcut in the central mechanism and leave Flashlock’s enabled.
I suspect that Mozilla’s Ubiquity project might be working on something like any or all of the above.
RIch · 2009-04-22 05:51 · #
shift + control E is used for editing css on web developer toolbar. It seems to bring up the abp toolbar… can I turn shortcuts keys off?
Reply from Wladimir Palant:
http://adblockplus.org/en/faq_customization#shortcuts
Click170 · 2009-08-03 06:58 · #
I like your plugin, but you choice for picking control shift V is indescribably irritating. Every fucking time I accidentally hit control shift v, that stupid little window comes up in my browser and I have to use the mouse to close it before continuing. Anyone familiar with terminal (from a gui) is familiar with control shift V being associated with paste; as in copy and paste. It wouldn’t be so bad if you would let your freaking users decide for themselves what the key bind was but you don’t even do that; I assume theres a damn good reason.
Reply from Wladimir Palant:
Feel free to decide for yourself: https://adblockplus.org/en/faq_customization#shortcuts
Jim Ruberto · 2009-11-10 20:20 · #
There’s definitely a problem and it’s getting worse. I’ve had shortcut conflicts with AdBlock Plus, the Del.icio.us plugin and Web Developer. It looks like somebody started a shortcut key registry at the link below, though I can’t tell how up to date it is.
http://kb.mozillazine.org/Keyboard_shortcut_registry_for_extension_authors_(Firefox)
It seems like the Mozilla project would be served well by some protocol around registering your add-on’s shortcut keys, or maybe even a little bit of code to resolve conflicts (a popup where the user decides which app “wins” when an add-on tries to register a shortcut key)
Reply from Wladimir Palant:
Given that this page talks about Adblock instead of Adblock Plus – no, it cannot be very current.
The problem with showing popups – most people don’t care, they never use shortcuts. The ones who need conflict resolution are a minority, imposing a decision on everybody because of that is not an option. One could say of course that this popup should show up whenever a shortcut key with conflicts is being used – that’s an option but getting it right would still be rather complicated.
Mark · 2009-11-13 02:58 · #
Hey Wladimir.
I use Ctrl+Shift+C for a common program I use, called “PureText”. It clashes with adblock’s Ctrl+Shift+C shortcut which I want to get rid of. How do I do that?
thanks :)
Reply from Wladimir Palant:
Ctrl+Shift+C? I guess you really mean Adblock, not Adblock Plus. I suggest you get rid of Adblock and install Adblock Plus then. Noboby has been working on Adblock for almost four years now.
Mark · 2009-11-13 15:21 · #
Er nope….I’m using Adblock Plus 1.1.1.
When I type Ctrl+Shift+C it opens a “blockable items on current page” panel.
:S
Reply from Wladimir Palant:
Well, the default is Ctrl+Shift+V – so you must have changed it already :)
See https://adblockplus.org/en/preferences#sidebar_key
Mark · 2009-11-13 17:23 · #
Thanks. Setting it to something different seemed to stop it (after a FF restart). Cheers!