remapping the #$#$ Windows key so it can be used in Linux VM
-
Compile xmonad.hs to use modMask = mod3Mask ("mod3")
-
Use SharpKeys.exe on Windows host to remap "Left Windows" key to "F15", which is unused on modern keyboards. Reboot.
-
In Linux guest, type the "Left Windows" key. Then dmesg|tail -5 should produce output like this:
...
atkbd.c: Unknown key released (translated set 2, code 0x66 on isa0060/serio0).
atkbd.c: Use 'setkeycodes 66 <keycode>' to make it known.
- Map the key to Super_L
sudo setkeycodes 66 133
-
Hmmm.. this doesn't work. Run xev and type the "Left Windows" key. Wow, it shows XF86Copy (0x8d) as the key instead?!?
-
xmodmap -e "clear mod3" -e "add mod3 = XF86Copy"
-
Create /etc/init.d/xmonadkey file with "setkeycodes 66 133"
-
sudo ln -s /etc/init.d/xmonadkey /etc/rc5.d/S90xmonadkey sudo ln -s /etc/init.d/xmonadkey /etc/rc3.d/S90xmonadkey
References:
http://www.jveweb.net/en/archives/2011/01/configure-unrecognized-keys-in-linux.html https://wiki.archlinux.org/index.php/Extra_Keyboard_Keys