• Posted on July 6, 2015

LUbuntu Keyboard Shortcuts (Openbox)

Inside of LUbuntu there is no graphical program that comes packaged to edit keyboard shortcuts of your computer. But luckily, all of the keyboard shortcuts are stored in an easy to modify XML file. At the time of writing this post (Openbox 3.5.2), there is one somewhat annoying behaviour, in which you can’t set single-key keyboard shortcuts and I doubt this feature will change in the future.

  1. Navigate to the folder ~/.config/openbox
  2. Backup the XML file just in case you mess something up.
  3. Edit the XML file and change the <keybind> key attribute to the key that you want.

To perform this task using the terminal, launch the terminal with Ctrl+Alt+T or by using the menu.

$ cd ~/.config/openbox
$ ls
  lubuntu-rc.xml

$ cp lubuntu-rc.xml lubuntu-rc.bak
$ leafpad lubuntu-rc.xml
$ openbox --restart

They value inside of the <keybind> key attribute is the shortcut key. Upper case characters of A,C,S,W,F1..12 are the control buttons, such as ALT, CTRL, Shift, Super Key, and the function keys. Lowercase letters represent the actual letter on your keyboard. Each value has to be separated with a single dash.

There are some other values such as “Up”, “Down”, “Left”, “Right” to represent the arrow keys, the value “Escape” to be the ESC key, “Space” as the space bar, Some additional special keys are “Home”, “Delete”, “Print”, and “Tab”.

Inside the <keybind> tags, you will see the <action> tag. This tag will have the name attribute which is commonly “Execute”. If the name attribute is “Execute” the <action> tag will have a child tag of <command> which is the command that executes when that key is pressed.

There are some <action> tags which have the name attribute set to something other than “Execute” and these perform special tasks such as “ToggleFullscreen” or “Maximize”. To see a full list of actions you can visit the Openbox wiki page on Actions.

For extra information on keyboard bindings, you can visit the Openbox Bindings page which will show more technical information.