Skip to content

Instantly share code, notes, and snippets.

@webcoyote
Created February 10, 2013 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webcoyote/4748624 to your computer and use it in GitHub Desktop.
Save webcoyote/4748624 to your computer and use it in GitHub Desktop.
Notes for fixing Windows key to be usable by xmonad desktop manager in Linux virtual machine

XMonad keyboard fix

remapping the #$#$ Windows key so it can be used in Linux VM

  1. Compile xmonad.hs to use modMask = mod3Mask ("mod3")

  2. Use SharpKeys.exe on Windows host to remap "Left Windows" key to "F15", which is unused on modern keyboards. Reboot.

  3. 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.
  1. Map the key to Super_L
sudo setkeycodes 66 133
  1. Hmmm.. this doesn't work. Run xev and type the "Left Windows" key. Wow, it shows XF86Copy (0x8d) as the key instead?!?

  2. xmodmap -e "clear mod3" -e "add mod3 = XF86Copy"

  3. Create /etc/init.d/xmonadkey file with "setkeycodes 66 133"

  4. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment