LATELY — 3 June 2008
Disabling accesskeys (shortcuts) in WordPress
OS X comes standard with many Emacs keybindings (Ctrl-A to move the cursor to the start of the line, Ctrl-E to go to the end, Ctrl-N and Ctrl-P for next and previous line, etc.), and since I’ve been using these keybindings for about 15 years it’s pretty difficult to not hit, say, Ctrl-P when it happens to conflict with WordPress’s shortcut to publish a post… This is pretty much guaranteed to happen at least once whilst writing a post, so this needed to be fixed.
There’s no configuration option to turn this off, and
The fix I came up with is below; I’m just dumping this here instead of packaging it up because I haven’t tested it on IE and it doesn’t work at all on Firefox (though see below for a solution for Firefox). You basically need a plugin like this:
Access keys are a bit of a failure, I think. They’re not consistent, not transparent (you don’t know what’s going to happen before hitting a combination), and they can conflict with whatever bindings your users might be using already.
Turns out that the original Emacs keybindings were fixed the way they are because, when Guy Steele was putting them together, about 20 people at the AI lab at MIT were already using Emacs, and so he couldn’t change the bindings without alienating existing users…
A few years ago I asked Google answers for a good, authoritative, durable reference for Emacs keybindings (I wanted to pass this on to people) and didn’t get any good replies. I wonder if one exists now?
Final Emacs keybinding-related note: on OS X, putting DefaultKeyBinding.dict in
~/Library/KeyBindings makes a whole lot more Emacs keybindings available, as well as making Home and End work the way they do on Windows. (i.e. move cursor to the beginning and end of the line.)