How to add keyboard shortcut to LXDE X-Desktop

Using "xev" we can determine the name of the key. Just run xev in the terminal. The following image show xev output when we press on "audio raise volume" in the keyboard:

xev output

Now to make an audio raise keyboard shortcut, open ~/.config/openbox/lxde-rc.xml if your favorite editor (if you use lubuntu the file name should be ~/.config/openbox/lubuntu-rc.xml) and find the <keyboard> tag, under this tag add the following:


	    <keybind key="XF86AudioRaiseVolume">
	      <action name="Execute">
	        <commanda>mixer set Master 2%+</command>
	      </action>
	    </keybind>
	

Finally relog to LXDE.

Similarly, to make this keyboard shortcut on openbox-X-desktop open ~/.config/openbox/rc.xml with your favorite editor (if the file does not exist, create it). If the file rc.xml exists (and not empty), then as before find the <keyboard> tag, add the following:


	    <keybind key="XF86AudioRaiseVolume">
	      <action name="Execute">
	        <commanda>mixer set Master 2%+</command>
	      </action>
	    </keybind>
	

between the <keyboard> and </keyboard> tags. Otherwise add the following code:


<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file, it will be overwritten on install.
        Copy the file to $HOME/.config/openbox/ instead. -->
<openbox_config xmlns="http://openbox.org/3.4/rc">
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <commanda>mixer set Master 2%+</command>
      </action>
    </keybind>
</openbox_config>
to ~/.config/openbox/rc.xml
 
 
Disclaimer Privacy