Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
Search the VMware Knowledge Base (KB)   View by Article ID

Linux Hosts That Use the evdev Driver for Keyboards Do Not Map Keys Correctly in Any Guest (1007439)


Some of the newest Linux distributions use Xorg 1.4, and the new evdev driver manages all devices, including keyboards. The evdev driver causes the keyboard to send different key codes. For example, the down arrow is key code 116, which other drivers understand to be Win+R. Consequently, keyboard mapping problems occur in all guest operating systems.
Some distributions that use or plan to use the evdev driver by default are Ubuntu 8.10 Intrepid Ibex, openSUSE 11.3, and Fedora Core 10.


Note: This issue was fixed as of Workstation 6.5.2, and the fix is included in all later releases. Vist our Download Center to download the latest version of Workstation:
For Workstation 6.5.1 and earlier, follow the solution below.
If you have a Linux distribution that uses the evdev driver for keyboard input, add the following lines to the ~/.vmware/config file on the host or, if your home directory is shared between multiple machines and some run a distribution that uses the evdev driver while others do not, add the following lines to the /etc/vmware/config file on the host:
xkeymap.noKeycodeMap = "TRUE"

This property setting means that keysyms rather than keycodes will be mapped to v-scan codes. A keysym corresponds to the symbol on the key top, whereas a keycode corresponds to the physical position of the key in the keyboard. For example, the Z key on a German keyboard generates the same key code as the Y key on an English keyboard, but the German Z key generates the same keysym as the English Z key.

When you use keysym mapping, the VMware product tries to detect the language used in the xkeymap directory in the installation directory. On Workstation, the default directory is /usr/lib/vmware/xkeymap. Using keysyms is often recommended if the X server is not X86 or if it is remote.

If adding the xkeymap.noKeycodeMap property alone does not work, try mapping specific keycodes by also adding the following lines to the ~/.vmware/config or /etc/vmware/config file on the host.

Note: The keycode mapping listed in this example is for standard keyboard layouts. Other layouts may require different keycode mappings.

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
If the key you are having a problem with is the AltGr key (called "Alt Graph" on Sun Microsystem keyboards), you need to add another line in addition to the xkeymap.noKeycodeMap line. You must map the specific keysym to the v-scan code for the key.
To determine the keysym for your AltGr key, run the xev or xmodemap -pk command. In the window that appears, press the AltGr key, the keysym is displayed. Map the resulting keysym to the v-scan code 0x138 by adding the following line:
xkeymap.keysym.<sym> = "0x138"
Replace <sym> with the keysym code for your AltGr key. Following is an example:
xkeymap.keysym.Alt_R = 0x138


cannot-use-keyboard  mouse-keyboard-does-not-respond  use-keyboard



Update History

05/14/2011 - Added resolution information about versions.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 41 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 41 Ratings