Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers

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 bugs.launchpad.net/ubuntu/+source/indicator-appmenu/+bug/610234 –  sup Mar 14 '12 at 23:52
    
Just remove the appmenu packages and it'll work with the rest of unity. –  Ken Mar 16 '12 at 15:27
add comment

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
add comment

Your Answer

 
discard

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.