Ubuntu – Super key (“The Windows Key”) not working in i3wm in 14.04.1 LTS

14.04i3-wmshortcut-keys

I just installed i3wm but I can't configure the $mod to be mod4 (Super aka "the Windows Key" in other OSes). I can only choose to use the mod1 (Alt).

I've tried reinstalling i3, and deleting the configure file to create a new one, without any good results. I really want to use Super because using Alt often conflicts with other program's short cuts.

Anyone else had this problem or have any suggestions on how I can fix this. I've used i3wm before with Ubuntu 12.04 LTS without any problems whatsoever.

Best Answer

Run xev and whenever you press the super key you should see something like this:

KeyPress event ...
    root 0x25, subw 0x0, ...
    state 0x0, keycode 89 (keysym 0xffeb, Super_L), same_screen YES,
    ...

If this doesn't work I can't help you. If it does then just note the description of the key just after the keysym. It's Super_L in this example but it might be something else in your case. Now execute these commands:

xmodmap -e "clear mod4"
xmodmap -e "add Mod4 = Super_L"

*ATTENTION: make sure you replace Super_L with the description that xev prints to you in the above commands *

The curious can also run xmodmap -pm|grep mod4 in the end which should show mod4 Super_L