Custom Gnome Keyboard Shortcuts
I’m a keyboard junkie. If I can manage to feng-shui my hands into such a position that I can elicit action from my computer without reaching for the mouse, I’m all over it. Part of it is because to use the mouse means, at some point, a transition BACK to two-hand typing. I find that the time it takes to either glance away from the screen – or feel my way back to the home row – can actually disrupt my train of thought. I’m also the guy that uses a manual can opener, because when the power goes out, I don’t want to be stuck with imperishable food that I have to hack into. Maybe I’m just weird.
I jest (sort of) – but I actually have been in situations where GUIs blew up for no good reason, and I was only left with command-line access to the server over SSH – quick fingers and a solid knowledge of the “old-school” config files saved the company hours of site downtime.
I digress.
Either way, I love keyboard shortcuts, and I’ve found it’s actually very easy to create all the custom keyboard shortcuts you want under the Gnome Desktop. First, you’ll need a very handy tool (if you don’t already have it) called the gconf-editor. It’s a right useful little GUI into the heart of the Gnome Configuration files.
From the default gconf-editor screen, browse into apps -> metacity. First, you’ve got to tell Gnome which keys you want to be pressing. Enter “global_keybindings” and find “run_command_X” (replace X with the number of your choice. I’ll arbitrarily choose 4 in this example). Double click “run_command_4″, and you’ll get prompted to “Edit Key”. Here, enter your preferred key combination. Note: You won’t actually be pushing those keys, you have to tell Gnome what they are. For example, if you want to open Pidgin with the key combo <Control><Alt>p, then in this dialog you’ll have to enter, literally, the text “<Control><Alt>p”.

So now Gnome will capture <Control><Alt>p. But it won’t do anything with it… yet. Head from “global_keybindings” to “keybinding_commands”. Double click the corresponding “command_X” entry (in this example, “command_4″) and once again, the “Edit Key” window pops up. This time, you need to tell Gnome what to do when you press the keys bound to command_4. In our example here, you’d just type “pidgin” and be done with it. Really, you can put anything in here you want.

And voila. Now, when you press <Control><Alt>p, Gnome will go and launch your favorite purple instant messaging client.
Of course, you’ll replace my example text with your own keyboard shortcuts, bound commands, and tales of culinary paranoia.