Can I assign custom keyboard shortcuts to menu items in Ubuntu apps?

OSX allows the user to add custom keyboard shortcuts for menu items. For example, you can define a custom key combination for Copy, and it will work for each application that has a Copy menu item.

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

+4
source share
3 answers

For KDE applications, you can use common keyboard shortcuts. To do this, open systemsettings and go to Standard Keyboard Shortcuts .

For example, here I change the โ€œactivate next tabโ€ shortcut to Ctrl - Tab (for consistency with Firefox):

KDE's keybinding changer

This changes the shortcut in most KDE tabbed applications, as well as in tabbed dialogs. You can specify up to 2 alternative shortcuts for each action.

However, this only works for regular shortcuts; you cannot globally specify shortcuts for arbitrary captions of menu items.

I do not think GNOME applications have such a feature. You must change the labels individually (for each application). (Generally, KDE is more customizable.)

+2
source

Is there a way to set an absolute key combination for an arbitrary menu item name that will be executed by any GTK + application?

Not.

Can you set another global shortcut for Cut / Copy / Paste?

I suspect. I have not read, but here are two promising links: makes linux keyboard shortcuts uniform as Mac and change default keyboard shortcuts / preferences like copy and paste

You can, of course, modify GTK + applications to customize their shortcuts. In the case of the GTK + application, whose graphical interface was developed using Glade, for example. virt-manager , this can be ridiculously trivial.

+1
source

I suggest you take a look at xbindkeys and xdotool. These are automation tools that can help you model specific keystrokes with a custom shortcut. Thus, although you do not really change the original shortcuts, you can still use the desired function key combinations.

0
source

Source: https://habr.com/ru/post/1398608/


All Articles