Home DIY The Best Raspberry Pi Keyboard Shortcuts You Should KnowThe Best Raspberry Pi Keyboard Shortcuts You Should Know
2. This will open the XML file that holds all the existing keybindings on Raspberry Pi OS. Now, move down and look for “Keybindings for running applications“. Here, you can either modify the existing keyboard shortcuts or add your own custom hotkey.
3. To add a custom keyboard shortcut on Raspberry Pi, you need to follow the below syntax. <keybind key=\”custom_keyboard_shortcut\”> <action name=\”operation\”> <command>command_name</command> </action></keybind>
4. Here, under the keybind key, you can assign your own keyboard shortcut. For example, if you want to open the Chromium browser by say, pressing the Ctrl + B shortcut, follow the below syntax. C is for Ctrl and B is for the shortcut letter B. This is how the keybind entry looks like.<keybind key=\”C-B\”> <action name=\”operation\”> <command>command_name</command> </action></keybind>
5. By the way, here are some keybind keys for you to take note of. Keep in mind, these are case-sensitive keybindings.
- C – Ctrl
- A – Alt
- S– Shift
- space – Spacebar
- Return – Enter
- BackSpace – Backspace
6. Now, coming to the action name. Well, the common one is Execute, and it will perform most of your actions. If you want to learn more about the different types of actions, you can head over to this page. So after defining the keybind shortcut and action, this is what the entry looks like.<keybind key=\”C-B\”> <action name=\”Execute\”> <command>command_name</command> </action> </keybind>
7. Moving to the final part and that is the command name. Here, you need to define the application you want to open. To find the command name for an application, right-click on it and open “Properties”. Now, move to the “Desktop Entry” section and copy whatever is inside the “Command” field. That is your command name, and you need to enter it into the syntax above. So for opening Chromium using the Ctrl + B shortcut, this is what the entry looks like.
<keybind key=\”C-B\”> <action name=\”Execute\”> <command>chromium-browser</command> </action></keybind>
8. Now, add this entry to the XML file we opened via the Terminal. After that, press Ctrl + O and “Y” to save the changes, and press Ctrl + X to quit the Nano editor.
9. Finally, run sudo reboot to restart the Raspberry Pi, and there you have it. Now, whenever you press the Ctrl + B shortcut, Raspbian OS will open the Chromium browser. So that is how you can create your own keyboard shortcuts on Raspberry Pi.Disable Keyboard Shortcuts on Raspberry Pi
1. To disable a specific keyboard shortcut on Raspberry Pi, we need to open the same XML file as described in the method above. Open the Terminal and run the below command. sudo nano /etc/xdg/openbox/lxde-pi-rc.xml
2. Move to “Keybindings for running applications” and delete the keybinding entry for that keyboard shortcut, and you are done. Press Ctrl + O, then choose “Y” and press Ctrl + X to quit the editor. Use Raspberry Pi With Keyboard Shortcuts Effortlessly
So these are the best keyboard shortcuts for navigating Raspberry Pi OS. We have also explained the steps to create your own custom hotkey on Raspberry Pi, just like on Windows 10. If you are an advanced user, I would suggest you tinker with the XML file as detailed above. It will boost your productivity by many folds. Anyway, that is all from us. If you have any questions, let us know in the comment section below.