VkKeyScanEx

int VkKeyScanEx(
  WORD wChar, 
  DWORD lcid
 );
 

Translates an ANSI character code into a virtual-key code and a shift state. The translation is based on the specified locale. It is intended for applications that send text to other applications by simulating keyboard input.

wChar
ANSI character to translate.
lcid
Locale identifier.

The export ordinal for this function is 11.

The returned shift state is one of the following values:

Value Meaning
0 No shift.
1 Character is shifted.
2 Character is CTRL character.
6 Character is CTRL + ALT.
7 Character is SHIFT + CTRL + ALT.

The values 3, 4, and 5 are not used.

Virtual-key codes applying to the numeric pad (VK_NUMPAD0 through VK_DIVIDE) are not returned. This is done to force a translation for the main keyboard, if it exists.

See Also

OEMKeyScan