Search

Language:  
Search for:

Available article translations:

Incorrect keyboard input in virtual machine

APPLIES TO:
  • Parallels Desktop 6 for Mac
  • Parallels Desktop 5 for Mac
  • Parallels Desktop 4 for Mac
  • Parallels Desktop 3 for Mac

Symptoms

Majority of non-alphanumeric keys are broken in a virtual machine, for example

* PgUp - prints '/'
* PgDn - calls context menu
* Home key - does not work etc.

The combinations may be very different, depending on the keyboard type.

Cause

Such situation may occur if you use non-standard keyboard or keyboard layout (by standard 101/102-key US traditional keyboard is implied).

Resolution

To eliminate this problem in the Parallels Dispatcher directory (/etc/parallels) create a file keycodes.xml containing the following information (one section per each broken key):

<XKeyMaps>
     <KeyMapping>
        <XKeyCode>XX</XKeyCode>
        <VmKeyCode>KEY_***</VmKeyCode>
     </XKeyMapping>

     <XKeyMapping>
        <XKeyCode>YY</XKeyCode>
        <VmKeyCode>KEY_***</VmKeyCode>
     </XKeyMapping>

</XKeyMaps>

where XX and YY are keycodes for broken keys, аnd KEY_*** is a symbolic name of the key.

To find out a keycode, please, open Console an issue the command

xev

It will open a little window like on  the picture below:



After that, please press the key you would like to find a keycode for and in the Console window you will see the information required (see on the picture highlighted).

As for symbolic name, please choose it from the list below:

KEY_ESCAPE
KEY_1
KEY_2
KEY_3
KEY_4
KEY_5
KEY_6
KEY_7
KEY_8
KEY_9
KEY_0
KEY_MINUS
KEY_EQUALS
KEY_BACKSPACE
KEY_TAB
KEY_Q
KEY_W
KEY_E
KEY_R
KEY_T
KEY_Y
KEY_U
KEY_I
KEY_O
KEY_P
KEY_LEFT_SQUARE_BRACKET
KEY_RIGHT_SQUARE_BRACKET
KEY_ENTER
KEY_LEFT_CONTROL
KEY_A
KEY_S
KEY_D
KEY_F
KEY_G
KEY_H
KEY_J
KEY_K
KEY_L
KEY_SEMICOLON
KEY_SINGLE_QUOTE
KEY_APOSTROPHE
KEY_LEFT_SHIFT
KEY_BACK_SLASH
KEY_Z
KEY_X
KEY_C
KEY_V
KEY_B
KEY_N
KEY_M
KEY_COMMA
KE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_F13
KEY_F14
KEY_F15
KEY_F16
KEY_F17
KEY_F18
KEY_F19
KEY_F20
KEY_F21
KEY_F22
KEY_F23
KEY_F24
KEY_NP_EQUAL

NOTE: *_NP_ means "Numeric keypad"




6c0bc137413ef2b485c9418f5dd9403a 1e5db16426987d561060acdf56d947b4 33c4522b6fa9ca8e050f19b889fb58f1 279e509e1fbdf7d3ff4adbfcc21d2666 b0d2afa3ea1ba6ce10dddf5df618e6f6 5de01269f8a616c8c62832c3bf8cb718

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No