Hello Evilzoners. I'm going to write a real brief tutorial on editing keybindings in Linux.
Let's Get Started
Many of you probably know how to do this. Some of you may be wondering why I would waste mine and your time on such a simple thing. Well, depending on your WM or DE it may not be so obvious. This tutorial is for those new to Linux.
Gnome- In Gnome this is very easy. This can be done through the Gnome Control Center.
KDE - Editing keybindings can be done in the System Settings
XFCE4 - Like most other flashy distros, this can be done in Keyboard settings.
Openbox - The real reason I wrote this is to show you how to edit keybindings in Openbox. In order to edit keybindings in Openbox you need to edit the ~/.config/openbox/rc.xml config file.
Creating a Keybinding
In order to add a keybinding to ~/.config/openbox/rc.xml you must scroll down to where it says <keyoard> Creating a keybinding via config files is really quite simple. The basic format goes like this:
<keybind key="">
<action name="">
<command> </command>
</action>
</keybind>
For example, if you wanted to make a new keybind to open up the terminal using the Super key(Windows key, Meta key)and the the T key your format would look like this:
<keybind key="W-t">
<action name="Execute">
<command>terminal</command>
</action>
</keybind>
The W key stands for the Super-or Window-key. Let's try another example:
<keybind key="C-S-z">
<action name="Execute">
<command>urxvt</command>
</action>
</keybind>
The C key stands for Ctrl and the S stands for Shift. Likewise, you can use A for Alt. So for this you would hold Ctrl-Shift and then press z. Other keys such as F1, Escape, Tab and any numbers you would just enter in as they are. The <command> is the command that you would otherwise enter in to the terminal to execute. If you want to find some commands you can go to your file system and look in /usr/share/applications then right click on an application and go to the launcher tab. The command will be there. For you lazy people:
<keybind key="S-5">
<action name="Execute">
<command>firefox</command>
</action>
</keybind>
That makes it so all you have to do is hold shift and press 5 and it opens firefox. You could even create a keybinding that opens firefox to a specific website!
<keybind key="C-A-f"
<action name="Execute"
<command>firefox evilzone.org</command>
</action>
</keybind>
Also be sure to reconfigure openbox otherwise the keybinding won't work. Other actions you could do include things like showing a menu.
<keybind key="A-r">
<action name="ShowMenu">
<command>root-menu</command>
</action>
</keybind>
This keybind will open up you Openbox menu so you don't have to have your cursor over the desktop and right click to see it.
Conclusion
Many new linux users find editing config files daunting. I assure you that it is very simple. Always be sure to double check your changes before saving and Don't Change Anything If You Don't Know What It Does!! Always ask google.
Well, I never know how to conclude these things. So, thanks for reading. I understand this may be very mundane information to many users, but I figured this was one of those things a lot of new guys are afraid to ask. Keybindings definitely make your linux experience a faster smoother experience.
"We will encourage you to develop the three great virtues of a programmer: laziness, impatience, and hubris." Larry Wall, Programming Perl