For quite some time I've been having issues with the Windows keys in my Spanish keyboard under X11. I like to use these as an extra modifier (Mod4) instead of a regular key (Super_L), because it is very handy when defining keybindings. The X11 default seems to treat them as Super_L only. For example, trying to attach Win+N as a keybinding to one of the actions in the GNOME Keyboard Shortcuts panel resulted in the Super_L combination instead of Mod4+L, hence not working at all.
Fortunately, I found how to fix that within GNOME a while ago. It is simply a matter of enabling the "Meta is mapped to the left Win-key" option in the Keyboard configuration panel. But... I was now forced to use Fluxbox while I rebuild some parts of GNOME and the modifier was not working because the system was using X11 defaults again.
After inspecting /etc/X11/XF86Config and some of the files in /usr/X11R6 I found how to enable this behavior in the regular X11 configuration files, bypassing GNOME. It is a matter of adding the following line to the keyboard section of XF86Config:
Option "XkbOptions" "altwin:left_meta_win"
I guess this works the same for X.Org.
Want more posts like this one? Take a moment to subscribe.
Enjoyed this article? Spread the word or join the ongoing discussion.