MapVirtualKey

This function translates, or maps, a virtual-key code into a scan code or character value, or translates a scan code into a virtual-key code.

UINT MapVirtualKey( 
UINT uCode, 
UINT uMapType );

Parameters

  • uCode
    [in] Specifies the virtual-key code or scan code for a key.
  • uMapType
    [in] Specifies the translation to perform. It is the following value:
    Value Description
    2 The uCode parameter is a virtual-key code and is translated into an unshifted character value in the low-order word of the return value. Dead keys (diacritics) are indicated by setting the top bit of the return value. If there is no translation, the function returns 0.

Return Values

A character value indicates success. Zero indicates that there is no translation.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h   Kbdui.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

GetAsyncKeyState, GetKeyState

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.