Specifications

www.vmware.com
312
VMware GSX Server Virtual Machine Guide
xkeymap.usekeycodeMap = true
Always use key code mapping regardless of server type.
xkeymap.nokeycodeMap = true
Never use key code mapping.
xkeymap.keycode.<code> = <v-scan code>
If using key code mapping, map key code <code> to <v-scan code>. In
this example, <code> must be a decimal number and <v-scan code>
should be a C-syntax hexadecimal number (for example, 0x001).
The easiest way to find the X key code for a key is to run xev or xmodmap -pk. Most
of the v-scan codes are covered in the V-Scan Code Table on page 314. The keysym
mapping tables described in this section are also helpful.
Use this feature to make small modifications to the mapping. For example, to swap
left Ctrl and Caps Lock, use the following lines:
xkeymap.keycode.64 = 0x01d # X Caps_Lock -> VM left ctrl
xkeymap.keycode.37 = 0x03a # X Control_L -> VM caps lock
These configuration lines can be added to the individual virtual machine
configuration, to your personal GSX Server configuration (~/.vmware/config), or
even to the host-wide (/etc/vmware/config) or installation-wide (usually
/usr/local/lib/vmware/config) configuration.
When key code mapping cannot be used (or is disabled), GSX Server maps keysyms to
v-scan codes. It does this using one of the tables in the xkeymap directory in the GSX
Server installation (usually /usr/local/lib/vmware).
Which table you should use depends on the keyboard layout. The normal distribution
includes tables for PC keyboards for the United States and a number of European
countries and languages. And for most of these, there are both the 101-key (or 102-
key) and the 104-key (or 105-key) variants.
GSX Server automatically determines which table to use by examining the current X
keymap. However, its decision-making process may sometimes fail. In addition, each
mapping is fixed and may not be completely right for any given keyboard and X key
code-to-keysym mapping. For example, a user may have swapped Ctrl and Caps Lock
using xmodmap. This means the keys are swapped in the virtual machine when using
a remote server (keysym mapping) but unswapped when using a local server (key
code mapping).
Therefore, keysym mapping is necessarily imperfect. To make up for this defect, you
can change most of the behavior using configuration settings: