When key code mapping cannot be used or is disabled, Workstation Pro maps keysyms to v-scan codes. If a language-specific keyboard does not appear to be supported by Workstation Pro, you might need to set a property that tells Workstation Pro which keysym table to use.

Workstation Pro determines which table to use by examining the current X keymap. However, its decision-making process can sometimes fail. In addition, each mapping is fixed and might not be completely correct for any given keyboard and X key code-to-keysym mapping. For example, if a user uses xmodmap to swap Ctrl and Caps Lock by, the keys are swapped in the virtual machine when using a remote server (keysym mapping), but are unswapped when using a local server (key code mapping). To correct this situation, you must remap the keys in Workstation Pro.

To configure how keysyms are mapped, you add one or more properties to the virtual machine configuration (.vmx) file or to ~/.vmware/config.

Prerequisites

  • To change the mapping of a few keys, determine the keysym name for each key. To find a keysym name, use the xev or xmodmap -pk command. The X header file /usr/include/X11/keysymdef.h also has a complete list of keysyms. The name of a keysym is the same as its C constant, but without the XK_ prefix.

  • To use a different keysym table, determine which mapping table to use. The tables are located in the xkeymap directory in the Workstation Pro installation directory, which is usually /usr/lib/vmware. The table you must 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. For most of these, both the 101-key (or 102-key) and the 104-key (or 105-key) variants are available.

    If none of the mapping tables is completely correct, find one that works best, copy it to a new location, and change the individual keysym mappings.

  • Familiarize yourself with the v-scan codes. See V-Scan Code Table.

  • Power off the virtual machine and exit Workstation Pro.

Procedure

  • To disable X key code mapping to map keysyms rather than key codes to v-scan codes, add the xkeymap.nokeycodeMap property and set it to TRUE.

    For example: xkeymap.nokeycodeMap = "TRUE"

  • If Workstation Pro has a table in the xkeymap directory for your keyboard but cannot detect it, add the xkeymap.language property and set it to one of the tables in the xkeymap directory.

    For example: xkeymap.language = "keyboard_type"

    If the failure to detect the keyboard means that the table is not completely correct for you, you might need to create a modified table and use the xkeymap.fileName property instead.

  • To use a different keysym mapping table that is not in the xkeymap directory, add the xkeymap.fileName property and set it to the path to the table.

    For example: xkeymap.fileName = "file_path"

    The table must list a keysym for each key by using the form sym="v-scan_code", where the sym value is an X keysym name and v-scan_code is a C-syntax hexadecimal number, for example, 0x001. Use a new line for each keysym.

    Note:

    Because compiling a complete keysym mapping is difficult, you should usually edit an existing table and make small changes.

  • To change the keysym mapping of a few keys, type the xkeymap.keysym property for each key, on separate lines.

    For example: xkeymap.keysym.sym = "v-scan_code"

    The value of sym must be an X keysym name and v-scan_code is a C-syntax hexadecimal number, for example, 0x001.