Linux – KDE Plasma – Custom Keybinds
Hello! In this post, we will be taking a look at how to make custom keybinds on Linux with the KDE Plasma Desktop Environment.
First, you will want to make sure you have your distribution set up with KDE Plasma, instead of another desktop environment such as GNOME, XFCE, or Cinnamon.
After that, you will want to go to your System Settings and click on “Shortcuts,” which can be found on the left. After that, you will want to click on “Custom Shortcuts.”
I have made a new group called “My Shortcuts.” This can be done by clicking “Edit,” found at the bottom, and clicking “New Group.”
Next, we will want to click Edit > New, and choose what kind of shortcut we want. The three options available are “Global Shortcut,” “Window Action,” and “Mouse Gesture Action.” In this case, we will be choosing Global Shortcut.
Under Global Shortcut, the three available options are Command/URL, D-Bus Command, and Send Keyboard Input. If we do the first option, then a command can be run in the terminal when the shortcut is activated. This is actually a lot more powerful than you think and can do a lot more than what one may expect the terminal to be able to do. If you choose the “Send Keyboard Input” option instead, then keyboard input will be sent when the shortcut is activated.
Let’s say that we have the KDE System Monitor installed, and we want to open it whenever we press Ctrl+Shift+Esc, similar to how this shortcut opens Task Manager on Windows. We can actually do this with a command, believe it or not. After selecting the “Command/URL” option, we will want to give it a name. Let’s call it “Open Task Manager” by making sure it’s selected and pressing F2, and typing in the name.
Next, we can add a comment through the Comment tab. Let’s use the comment “Open System Monitor with Ctrl+Shift+Esc“.
After that, we can select the Trigger tab. This is what will actually trigger the shortcut. We can click the button, which currently says “None,” and press “Ctrl+Shift+Esc” on the keyboard.
Finally, we have the Action tab. This is the tab where we will run the command. To open the KDE Plasma System Monitor, you can run plasma-systemmonitor
in the terminal. Therefore, that is what we will add.
Now, once we click “Apply” at the bottom, the shortcut will work!
You may be wondering how I knew the command to open the System Monitor from the terminal. The answer is by finding the “exec” value in the Desktop file for it. If you’re confused, don’t worry, just follow these steps:
cd
to/usr/share/applications
- Find what is most likely to be the application you want. There might be a large list, so you might have to look a bit or use the Find tool to search for it.
- Edit the file using a command-line editing tool such as nano or vim. I personally recommend nano, so the rest of these instructions will be using nano. Type
nano [nameofthefile].desktop
- Press Ctrl+W to search for
exec=
- Take note of the value you found. In this case, it is plasma-systemmonitor.
6. Press Ctrl+X to exit the file.
There you have it! Hopefully this article has helped you learn how to create custom shortcuts with KDE Plasma on Linux! Thanks for reading!