Attention: open in a new window. PDFPrint

Xorg, evdev and vmware-server

I just decided to remove my outdated xorg.conf and switch to the really nice hotplug features of the new Xorg server. I thought that it would be a good idea to switch von old kbd to the evdev keyboard driver. After removing my xorg.conf and updating my keyboard layout configuration everything worked quite fine.

Okay, let’s say: Everything but vmware-server. Directly after the update, the vmware-server 2 console messed up my keyboard input ignoring all special keys like the arrow-keys. Even the keyboard layout did not fit my system settings. As it is a known issue there is a workaround available:

Just add the following line to your /etc/vmware/config (or to your $HOME/.vmware/config as well):

xkeymap.noKeycodeMap = "TRUE"

You might also need to add some further special keymappings to the configuration file. In my case the Alt Gr key even did not work after adding the entry, so I have just added all keymap entries of the example on the vmware page, but added some quotes around the hex-values as they were ignored otherwise:

xkeymap.keycode.93 = "0x076"
xkeymap.keycode.97 = "0x073"
xkeymap.keycode.98 = "0x078"
xkeymap.keycode.99 = "0x077"
xkeymap.keycode.100 = "0x079"
xkeymap.keycode.101 = "0x070"
xkeymap.keycode.102 = "0x07b"
xkeymap.keycode.103 = "0x05c"
xkeymap.keycode.104 = "0x11c"
xkeymap.keycode.105 = "0x11d"
xkeymap.keycode.106 = "0x135"
xkeymap.keycode.107 = "0x137"
xkeymap.keycode.108 = "0x138"
xkeymap.keycode.109 = "0x000"
xkeymap.keycode.110 = "0x147"
xkeymap.keycode.111 = "0x148"
xkeymap.keycode.112 = "0x149"
xkeymap.keycode.113 = "0x14b"
xkeymap.keycode.114 = "0x14d"
xkeymap.keycode.115 = "0x14f"
xkeymap.keycode.116 = "0x150"
xkeymap.keycode.117 = "0x151"
xkeymap.keycode.118 = "0x152"
xkeymap.keycode.119 = "0x153"
xkeymap.keycode.120 = "0x16f"
xkeymap.keycode.121 = "0x120"
xkeymap.keycode.122 = "0x12e"
xkeymap.keycode.123 = "0x130"
xkeymap.keycode.124 = "0x15e"
xkeymap.keycode.125 = "0x059"
xkeymap.keycode.126 = "0x14e"
xkeymap.keycode.127 = "0x100"
xkeymap.keycode.128 = "0x000"
xkeymap.keycode.129 = "0x07e"
xkeymap.keycode.130 = "0x000"
xkeymap.keycode.131 = "0x000"
xkeymap.keycode.132 = "0x07d"
xkeymap.keycode.133 = "0x15b"
xkeymap.keycode.134 = "0x15c"
xkeymap.keycode.135 = "0x15d"
xkeymap.keycode.136 = "0x168"
xkeymap.keycode.146 = "0x131"
xkeymap.keycode.148 = "0x121"
xkeymap.keycode.150 = "0x15f"
xkeymap.keycode.151 = "0x163"
xkeymap.keycode.160 = "0x10a"
xkeymap.keycode.163 = "0x16c"
xkeymap.keycode.164 = "0x166"
xkeymap.keycode.165 = "0x16b"
xkeymap.keycode.166 = "0x16a"
xkeymap.keycode.167 = "0x169"
xkeymap.keycode.171 = "0x119"
xkeymap.keycode.172 = "0x122"
xkeymap.keycode.173 = "0x110"
xkeymap.keycode.174 = "0x124"
xkeymap.keycode.180 = "0x132"
xkeymap.keycode.181 = "0x167"
xkeymap.keycode.191 = "0x05d"
xkeymap.keycode.192 = "0x05e"
xkeymap.keycode.193 = "0x05f"
xkeymap.keycode.199 = "0x133"
xkeymap.keycode.220 = "0x10b"
xkeymap.keycode.225 = "0x165"
xkeymap.keycode.234 = "0x16d"
xkeymap.keycode.244 = "0x109"
xkeymap.keycode.246 = "0x157"

To generate own custom keymappings just use xev to find out the keycode. As xev creates a lot of console output you might want to use this command:

xev | grep -Eoe "keycode [0-9]+"

Use the keycode to create your custom mapping. For example, Alt Gr causes a keycode 108 and has to be mapped to “0x138”. So your mapping entry would look like this:

xkeymap.keycode.108 = "0x138"

Further information can be found at this page on the vmware site.