Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OSX allows user to add custom keyboard shortcuts for menu items. For instance you can define a custom keyboard shortcut for "Copy" and it will work for every application that has a menu item called Copy.

Is there a way to do this for GTK and/or KDE applications?

share|improve this question

There is an obscure setting that is for this. XFCE has it in the GUI, but Gnome/Unity does not. The feature is an obscure one that's turned off by default, and perhaps because so few people use it, it doesn't always work very well.

But give it a try anyway. You'll need to install gconf-editor, if you haven't already:

sudo apt-get install gconf-editor

If you go into gconf-editor and do a search (ctrl+f) for "can_change_accels". In the dialog, make sure and check the "Search also in key names" checkbox. You should see a result with something like /desktop/gnome/interface/can_change_accels.

Check that to True.

gconf editor - can_change_accels

Once that's enabled, you can configure shortcuts by clicking on a menu and hovering your mouse over an item. When the menu item you want to bind a shortcut key to is hovered over, type the shortcut. It should appear immediately.

There are some caveats. One is, I'm not sure this works with Unity's global menu bar. Since I don't use Unity, I can't test and make sure. Another caveat is that non-native Gnome apps probably won't do this. So for example, if you're running a Java app, don't expect this to work.

share|improve this answer
It does not work with Unity, see – sup Mar 14 '12 at 23:52
Just remove the appmenu packages and it'll work with the rest of unity. – Ken Kinder Mar 16 '12 at 15:27

Go to System Settings > Shortcuts and Gestures > Standard Keyboard Shortcuts Select the action, select custom and press the None button. Then press the shortcut you want to have for that action. I hope I have helped you out.

share|improve this answer

To enable this temporarily for an application (to just change the setting), run it from terminal like this (this is for gedit, replace with the executable of your application):

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.