Custom Keybindings in elementary OS

The keyboard-settings pane in Ubuntu allows custom keyboard combinations to launch applications or scripts. This feature is currently missing from elementary OS’s keyboard plug. However, with a little command line foo we can setup the keybindings without the GUI.

First we need to install gconf2. It may be installed already, but in case it’s not:

sudo apt-get install gconf2

Next we use gconf tool to query which keybindings are already out there:

gconftool-2 --all-dirs "/desktop/gnome/keybindings"

On my machine, this returns 1 entry: /desktop/gnome/keybindings/custom0 We can dig deeper by executing:

Each keybinding needs it’s own folder. In this case, I used “custom1” since “custom0” was already in use. The rest should be pretty self-explanatory: give it a name, an action (command or script to run) and the keybinding you’d like to use.

You could try using <Button4> or <Button5> for mouse scroll events, but I doubt that will work.

Instead, you may have to use something like xbindkeys. I did a post on xbindkeys here: http://www.heath-bar.com/blog/?p=523 In that article, I bound the + mouse scroll to type + Plus/Minus, but you could change it to enter the Volume Up/Down keys instead.