Software & AppsOperating SystemLinux

How To Restore Default Keyboard Shortcuts on Ubuntu?

Ubuntu 21

In the world of Ubuntu, keyboard shortcuts are a user’s best friend. They provide quick access to various system functions, making your work more efficient. However, there may be times when you’ve changed a shortcut and want to revert it back to its default setting. In this article, we will guide you on how to restore default keyboard shortcuts on Ubuntu.

Quick Answer

To restore default keyboard shortcuts on Ubuntu, you can use the dconf-editor application for Ubuntu 13.04 and later versions, or the gconftool command for Ubuntu 12.10 and earlier versions. Alternatively, you can reset all shortcuts at once using the dconf command.

Understanding Keyboard Shortcuts in Ubuntu

Keyboard shortcuts in Ubuntu are a combination of keys that provide a quick way to perform certain tasks or commands. They can be system-wide or specific to certain applications. Ubuntu provides a set of default keyboard shortcuts, but users have the flexibility to change them according to their preferences.

Restoring Default Keyboard Shortcuts

Restoring default keyboard shortcuts in Ubuntu can be done using different methods depending on the version you’re using. We’ll cover the process for Ubuntu 13.04 and later versions, as well as for Ubuntu 12.10 and earlier versions.

Ubuntu 13.04 and Later Versions

For these versions, you can use the dconf-editor application to reset individual shortcuts. Here’s how:

  1. Open the dconf-editor application. If it’s not installed, you can install it using the command sudo apt-get install dconf-editor.
  2. Navigate to the following locations:
    • org.gnome.desktop.wm.keybindings
    • org.gnome.settings-daemon.plugins.media-keys
    • org.gnome.shell.keybindings
    • org.compiz.integrated

In each location, you can use the “Set to Default” button to reset the desired entry.

Alternatively, you can use the gsettings command in the terminal to reset a specific location. For example:

gsettings reset-recursively org.gnome.settings-daemon.plugins.media-keys

The reset-recursively parameter in the command will reset all the keys in the specified schema to their default values.

Ubuntu 12.10 and Earlier Versions

For these versions, you can use the gconftool command to reset individual shortcuts. Here’s how:

  1. Open a terminal and run the following command to find the key name you want to reset:
gconftool -R /apps/gnome_settings_daemon/keybindings
  1. Once you know the key name, you can reset it to its default value using the following command:
gconftool -u "/apps/gnome_settings_daemon/keybindings/key_name"

The -u parameter in the command stands for ‘unset’, which will revert the key to its default value.

Resetting All Shortcuts at Once

If you want to reset all shortcuts at once, you can use the dconf command to dump all settings to a file and then load it to restore them. Here are the steps:

  1. Dump all settings to a file:
dconf dump / > ~/.config/dconf/user.conf
  1. Open the file and select the settings you want to restore.
  2. When you want to restore the selected settings, run the following command:
dconf load / < ~/.config/dconf/user.conf

The dump command exports all the settings to a file, whereas the load command imports the settings from the file back to the system.

Conclusion

Restoring default keyboard shortcuts in Ubuntu is a straightforward process once you understand the commands and their parameters. Whether you need to reset a single shortcut or all of them at once, Ubuntu provides the necessary tools to do so. Always remember to be careful when modifying system settings, as incorrect changes can lead to unexpected system behavior.

How can I install the `dconf-editor` application on Ubuntu?

To install the dconf-editor application on Ubuntu, you can use the command sudo apt-get install dconf-editor in the terminal. This command will download and install the application on your system.

How can I find the key name for a specific shortcut in Ubuntu 12.10 and earlier versions?

You can find the key name for a specific shortcut in Ubuntu 12.10 and earlier versions by running the command gconftool -R /apps/gnome_settings_daemon/keybindings in the terminal. This command will display a list of key names for the shortcuts.

How can I reset all keyboard shortcuts at once in Ubuntu?

To reset all keyboard shortcuts at once in Ubuntu, you can use the dconf command. First, use the command dconf dump / > ~/.config/dconf/user.conf to dump all settings to a file. Then, open the file and select the settings you want to restore. Finally, run the command dconf load / < ~/.config/dconf/user.conf to load the selected settings and restore all shortcuts.

Are there any precautions I should take when modifying system settings related to keyboard shortcuts?

Yes, it is important to be careful when modifying system settings related to keyboard shortcuts. Incorrect changes can lead to unexpected system behavior. It is recommended to have a backup of your settings or take note of the changes you make so that you can revert them if needed.

Leave a Comment

Your email address will not be published. Required fields are marked *