How to Assign/Remap Keyboard Shortcuts for Better Productivity in Linux

Remap Keys Featured

By default, Ubuntu comes with a set of keyboard shortcuts that you can use straight away. However, you may not like the default mappings of some of these keyboard shortcuts. They might be assigned to shortcuts you’re used to using for something else, disrupting your productivity. For example, if you have a keyboard with a media button, that button is automatically mapped to Rhythmbox. If your favorite media player is VLC, you may want to change the keyboard shortcut to your favorite application.

There are several ways to manage your keyboard shortcuts in Linux. You can do it via Xmodmap (and Xkeycaps) or through your desktop environment’s keyboard/shortcut settings. This article will focus mainly on how to change the shortcuts or assign new ones on two of the most popular desktop environments, Gnome and KDE.

Gnome

To assign new shortcuts to Gnome on Ubuntu and remap the existing ones, press the Super key on your keyboard or click on Gnome’s Applications button to visit the main software menu. Start typing either keyboard or shortcuts and select the entry Keyboard Shortcuts when it shows up.

Remap Keys Gnome Locate Shortcuts

From here, you can scroll down the list to find the particular keyboard shortcut you want to change.

Remap Keys Gnome Choose Shortcut

Click on the existing shortcut and, when prompted, press the new key combination you want to change it to. For example, the default shortcut to show the run command prompt is Alt + F2. If you want to change it, click on it, and hit the new combo of your hoice, such as Alt + F12.

Remap Keys Gnome Remap Shortcut

You can also create your own keyboard shortcut and assign it to run an application, a command, or a script. Click the button with the plus symbol at the very end of the list.

Remap Keys Gnome Add New

The process is pretty straightforward: enter the name for your new shortcut and the command that will run with it in the Name and Command fields. Finally, click on the “Set Shortcut … ” button and, when prompted, press your desired key combination. Immediately, the window will update to include the combo you pressed.

Remap Keys Gnome New Shortcut Ready

If you decide you don’t want a shortcut you’ve added, click on it to select it, then click on the red Remove button on the top-left corner of the window that will pop up.

Remap Keys Gnome Remove Shortcut

Note that you can only remove shortcuts you’ve added and not the existing ones. You can only un-assign the existing ones so that their function stops being accessible through a button combination. To do that, click on an existing shortcut. Instead of pressing a new key combo when prompted, press Backspace on your keyboard. You’ll be returned to the previous screen, but now the key combination for the shortcut will have disappeared.

KDE

To do the same thing in a modern version of KDE’s plasma desktop, hit the Super key on your keyboard or click on its main menu button and choose “System Settings.”

Remap Keys Kde System Settings

When there, choose the Shortcuts entry in the workspace category on the left of the window.

Remap Keys Kde System Settings Shortcuts

KDE is more complicated but also offers much more control since it splits its shortcuts into different groups.

In Global Shortcuts, you will find keyboard combinations added to the system by both KDE and any installed applications. To change a shortcut that already exists, click on it and choose Custom instead of Default. Then, click on the button on the right of Custom and press your desired key combination when asked.

Remap Keys Kde Change Shortcut

In Standard Shortcuts you will meet keyboard combinations that are generally considered standard, no matter the desktop environment or even operating system.

Remap Keys Kde Standard Shortcuts

Web shortcuts are different in that they are not mapped to keyboard combinations but keywords. Those aren’t available everywhere and are accessible either through Krunner or in Konqueror’s address bar. For example, since DuckDuckGo’s search is mapped to the dd shortcut, if you’d like to search for Make Tech Easier, you can press Alt + F2, type dd:make tech easier, and hit Enter. Soon after, Konqueror will show up with your query open on DuckDuckGo’s page.

Remap Keys Kde Web Shortcuts

Custom Shortcuts contains even more specialized shortcuts and is also the place where you can add your own to the mix. Right-click on an empty spot, and a pop-up menu will allow you to create new global shortcuts, window actions, or mouse gesture actions. A sub-menu also enables you to choose if the result will be a Command/URL, D-Bus Command, or Send Keyboard Input.

Remap Keys Kde New Shortcut Pop Up

After you create a new entry, you can enter a short description of what that shortcut is supposed to do in the Comment tab, define the shortcut (or gesture) itself in the Trigger tab, and, finally, enter the command (or URL) in the Action tab.

Remap Keys Kde Shortcut Action

If you don’t click on Apply on the bottom right to enable your tweaks, KDE will make sure to bug you about it to ensure you don’t lose any changes you made.

That’s it. What other ways do you use to assign/remap keyboard shortcuts in your distro? Tell us in the comments section below.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.