Fun w. xmodmap
When you press keys on the keyboard, there are a few places that define what happens. The keyboard itself, the kernel, X or other display manager. For your goal, we can teach X to treat the Super key differently.
The Super key is typically mapped to Mod4. So, when you press Mod4+Tab, you may expect to be able to tab through different windows. Not always, but many times applications ignore this modifier, or do not receive it.
An option you have is to adjust how the Super key is treated. If you do this, you'll most likely want to swap out the functionality with a different key. This is to ensure you can continue to do things such as the previous example of Mod4+Tab, or other common combinations.
If you want to see how X is working with your current modifiers, you can print those using xmodmap
:
$ xmodmap
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
Here, we can see that all of the Super keys, and Hyper keys are mapped to Mod4. If your keyboard has a Left and a Right Super key, you could even make the adjustment only to on or the other. For example, you could take Super Left out of Mod4, while keeping Super Right as a normal Super button.
You should take some time to look into how others have used modifier keys over the years to get familiar with the idea and the way people have learned to take the most advantage. The idea is that you clear out the modifier, and then add back to it. You could set up something such as ~/.xmodmaprc
and then running xmodmap ~/.xmodmaprc
.
# .xmodmaprc
clear mod4
clear control
add mod4 = Super_R
add control = Super_L
add control = Control_L
add control = Control_R
Why not just use the Control key to begin with? It is very likely you have a Control key next to your Super key, so it will be up to you to find use for another modifier, such as Mod3, and use that. Others use Mod2 or Mod5 in pretty clever ways to increase the number of modifiers available.
Once you get everything the way you'd like, you can have these setting activated with X and your user every time you log in by adding the xmodmap
line to your ~/.xinitrc
file:
xmodmap ~/.xmodmaprc
After you remap your Super_L key to not be part of Mod4, but part of another modifier group, the Global Keyboard Shortcuts should pick up on your key combinations.
Issues likely to be related
While actually a Gnome bug (?), could this issue or similar be happening to you? It is more likely you want this Plasma configuration workaround, titled "How can I prevent Meta from opening up KDE Plasma's launcher?":
As implied here, edit ~/.config/kwinrc
, adding the following lines to the bottom.
[ModifierOnlyShortcuts]
Meta=
Then restart kwin with kwin_x11 --replace & disown
.
Best Answer
Just figured out. Setting the shortcut to Alt+F1 for the application menu automatically enables the super key as a shortcut for it.