Ubuntu / Linux news and application reviews.

Lubuntu (which uses Openbox as its window manager) doesn't come with any graphical user interface tool to edit or create new keyboard shortcuts, and to do this, you must either edit the configuration file manually, or use xbindkeys.

Obkey keyboard shortcuts Lubuntu (Openbox)

To simplify the process, you can use Obkey, an Openbox key editor. While its user interface is not the most intuitive, it simplifies the process of editing and adding new keyboard shortcuts.

Obkey modifies the Openbox configuration file, so it's recommended you save a backup, in case you want to revert the changes. Obkey does not provide a way to undo the changes!

To create a backup of the Openbox configuration (~/.config/openbox/lubuntu-rc.xml), use the following command:
cp ~/.config/openbox/lubuntu-rc.xml ~/.config/openbox/lubuntu-rc.xml.bck
You should find the backup ("lubuntu-rc.xml.bck") in the ~/.config/openbox/ folder. If later on you want to restore this backup, make sure Obkey is not running and use the command below:
cp ~/.config/openbox/lubuntu-rc.xml.bck ~/.config/openbox/lubuntu-rc.xml

Now back to Obkey. To use it in Lubuntu, you must run it using the following command (so it opens the Lubuntu Openbox configuration file):
obkey ~/.config/openbox/lubuntu-rc.xml

In the Obkey window, you'll notice a long list of keyboard shortcuts. The actions are not displayed in this list. To see the action for a certain keyboard shortcut, you must select it, then look under "Actions" on the bottom right.

Editing an already existing keyboard shortcut is as easy as clicking on it (first column), then pressing the new key combination.

To create a new keyboard shortcut, click the "Insert sibling keybind" (1) button, set the key (2), and to assign it an action, click "+" under "Actions" (3):

Obkey keyboard shortcuts Lubuntu (Openbox)

This inserts a new action called "Focus" - click on this and you can choose from various actions:

Obkey keyboard shortcuts Lubuntu (Openbox)

If you want to add a custom action, like running some application or script, select "Execute" as the action, and add the command in the top right pane:

Obkey keyboard shortcuts Lubuntu (Openbox)

After making any changes to the Openbox configuration file using Obkey, click the "Save" button! If the changes are not applied after clicking "Save", run the following command to reload the Openbox configuration:
openbox --reconfigure

Download Obkey

Obkey is not available in the official Lubuntu repositories. You can download an Obkey deb from Notesalexp (you can also add his repository) - it should work with any Lubuntu version. 

The deb does not depend on "python-gtk2", required to run Obkey, so make sure it's installed using the following command:
sudo apt install python-gtk2

Arch Linux users can install Obkey via AUR: stable | git (fork).

For other Linux distributions, download the Obkey source from HERE. Use THIS fork if you encounter issues with the original Obkey.