Raspberry PI – binding actions to (hot)keys
How to bind actions to Raspberry PI (hot)keys?
I want to define a key for starting the lxterminal on my Raspberry PI.
This is how you can do it:
- Open the LXDE configuration file:
sudo nano ~/.config/openbox/lxde-rc.xml
- In the <keyboard>(…)</keyboard> section add the following lines of code:
<keybind key=”F4″>
<action name=”Execute>
<command>lxterminal</command>
</action>
</keybind>
<keybind key=”F5″>
<action name=”Execute>
<command>gksu /usr/bin/x-terminal-emulator</command>
</action>
</keybind>
- Reboot the PI:
sudo shutdown -r now
When it’s back up-and-running, pressing the <F4>-key will launch the LX Terminal and the <F5>-key will launch the Root Terminal.