Tuesday, November 27, 2012

Edit shortcuts (keybindings) in Lubuntu

There is no easy GUI shipped with Lubuntu for editing hotkeys. The easiest way to create key bindings for Lubuntu is by opening the terminal and pasting in the following code:

sudo gedit ~/.config/openbox/lubuntu-rc.xml

This will open the hotkey configuration editor. At this point, you will need to search for the item you wish to edit. The following will help with some of the key codes:


C - Control Key
A - Alt Key
S - Shift Key
W - Super/Windows Key
Tab - Tab
Up - Up Arrow
Down - Down Arrow
Left - Left Arrow
Right - Right Arrow

Here's an example which binds Firefox to the key SUPER+f:

<keybind key="W-f">
    <action name="Execute">
        <command>firefox</command>
    </action>
</keybind>
To run a script:
 <keybind key="C-A-3">
      <action name="Execute">
        <command>sh ~/.screenlayout/single.sh</command>
      </action>
    </keybind>

No comments:

Post a Comment