OemKeyScan

3.0

  DWORD OemKeyScan(uOemChar)    
  UINT uOemChar; /* OEM ASCII character, */  

The OemKeyScan function translates (maps) OEM ASCII codes 0 through 0xFF to their corresponding OEM scan codes and shift states.

Parameters

uOemChar

Specifies the ASCII value of the OEM character.

Return Value

The low-order word of the return value contains the scan code of the specified OEM character; the high-order word contains flags that indicate the shift state: If bit 1 is set, a SHIFT key is pressed; if bit 2 is set, a CTRL key is pressed. Both the low-order and high-order words of the return value contain –1 if the character is not defined in the OEM character tables.

Comments

The OemKeyScan function does not translate characters that require CTRL+ALT or dead keys. Characters not translated by this function must be copied by simulating input, using the ALT+ keypad mechanism. For this to work, the NUM LOCK key must be off.

This function calls the VkKeyScan function in recent versions of the keyboard device drivers.

OemKeyScan allows an application to send OEM text to another application by simulating keyboard input. It is used specifically for this purpose by Windows in 386 enhanced mode.

See Also

VkKeyScan