Ubuntu – Multiple keyboard shortcuts for same command


Is it possible to assign multiple keyboard shortcuts for same default command.
I want to switch between workspaces using CTRL+NUMPAD_1 and using CTRL+1 too.

Or how to add custom command for switching?

Best Answer

Stephan's Answer which is quoted in Lambart's answer was updated and now has a very interesting side-note:

I also found out that the GUI that allows you to assign keybindings is limited in a way that annoys me. The GUI allows exactly ONE keybinding to be assigned to each action. In dconf, you can set an array of bindings for a single action.

Quick research lead me to Ubuntu's Wiki:

The keybindings that are handled by the window manager support multiple keys that will perform the same action. The gnome-control-center GUI does not support it, but you can make it work using dconf-editor. For example to have "Close window" use both the traditional F4 as well as an easier to hit Pause/Break button, change org.gnome.desktop.wm.keybindings close to ['Pause', 'F4'].

Anyway my attempt to set volume control to CTRL+SUPER++ and my laptop's media key via

gsettings set org.gnome.settings-daemon.plugins.media-keys volume-up ['<Primary><Super>KP_Add', 'XF86AudioRaiseVolume']

results in an error for invalid value while wrapping the array in quotes does not trigger an error but assigns no function to any of the keys neither. (I assume Ubuntu 12.04 might not having received an update in this regard).

Related Question