Usually in Gnome and KDE it is only possible to define shortcuts with the Super key in combination with another key. But is it possible to use only the Super key as a shortcut, and how could I achieve this?
2 Answers
Yes, you can. You can fill with Super_L to the shortcut you want, for example to use win key only for launching gnome menu :
open terminal, type :
gconftool-2 –set /apps/metacity/global_keybindings/panel_main_menu –type string “Super_L”
The gnome menu will lauch with windows key only.
-
This doesn't work in my case (Ubuntu 10.04). However it works, if I edit the panel_main_menu entry in the gconf-editor.– xilixOct 16, 2010 at 13:39
-
You have en-dashes (looks like) and angled quotes rather than "plain" double quotes there, so copy-pasting this directly won't work. (However, no quotes are needed here.)– Roger PateOct 16, 2010 at 19:01
-
1
gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string Super_L
– Roger PateOct 16, 2010 at 19:04
The Super key is a so-called modifier key, i.e., it is only meaningful in combination with some other key (it "modifies" the other key to report Super+key instead of just key). This makes it impossible to bind it to a shortcut with the System->Preferences->Keyboard shortcuts GUI without a tweak.
You can tell the system to not consider Super a modifier key any longer; then you will be able to map it to any shortcut you want.
In a terminal, type the command
xmodmap
; it will output a few lines -- look for the one that hasSuper_L
andSuper_R
in it. It should look like this:mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce)
See the
mod4
at the beginning of the line? That means thatSuper_L
andSuper_R
(left- and right- Super keys) are bound to the 4th modifier (there are 8 in total).If you want to be able to bind the
Super_R
key, give the command (note the quotes!):xmodmap -e 'remove mod4 = Super_R'
This tells X11 that right-Super should no longer be a modifier.
Note: These settings will not survive a reboot; you can make them permanent
by creating a text file .Xmodmap
in your home directory, and writing a single
line to it:
remove mod4 = Super_R