MapVirtualKey

Version 3.0

Syntax

WORD MapVirtualKey(wCode,wMapType)

This function accepts a virtual-key code or scan code for a key and returns the corresponding scan code, virtual-key code, or ASCII value. The value of the wMapType parameter determines the type of mapping which this function performs.

Parameter Description  

wCode WORD Specifies the virtual-key code or scan code for a key. The interpretation of the wCode parameter depends on the value of the wMapType parameter.  
wMapType WORD Specifies the type of mapping to be performed. The wMapType parameter can be any of the following values:  
  Value Meaning
  0 The wCode parameter specifies a virtual-key code, and the function returns the corresponding scan code.
  1 The wCode parameter specifies a scan code, and the function returns the corresponding virtual-key code.
  2 The wCode parameter specifies a virtual-key code, and the function returns the corresponding unshifted ASCII value.
  Other values are reserved.  

Return Value

The return value depends on the value of the wCode and wMapType parameters. See the description of the wMapType parameter for more information.