MapVirtualKey

3.0

  UINT MapVirtualKey(uKeyCode, fuMapType)    
  UINT uKeyCode; /* virtual-key code or scan code */
  UINT fuMapType; /* translation to perform */

The MapVirtualKey function translates (maps) a virtual-key code into a scan code or ASCII value, or it translates a scan code into a virtual-key code.

Parameters

uKeyCode

Specifies the virtual-key code or scan code for a key. How this parameter is interpreted depends on the value of the fuMapType parameter.

fuMapType

Specifies the translation to perform. If this parameter is 0, the uKeyCode parameter is a virtual-key code and is translated into its corresponding scan code. If fuMapType is 1, uKeyCode is a scan code and is translated to a virtual-key code. If fuMapType is 2, uKeyCode is a virtual-key code and is translated to an unshifted ASCII value. Other values are reserved.

Return Value

The return value depends on the value of the uKeyCode and fuMapType parameters. For more information, see the description of the fuMapType parameter.

See Also

OemKeyScan, VkKeyScan