OEMKeyScan

  DWORD OEMKeyScan(wOemChar)    
  WORD wOemChar;    

The OEMKeyScan function maps OEM codes (0 through 0FFH) into scan codes and shift states. This function provides information that enables a program to send OEM text to another program by simulating keyboard input. Windows, when running in 386 enhanced mode, uses it specifically for this purpose.

Parameter

wOemChar

Specifies the ASCII character.

Return Value

The return value is the scan code in the AX register and the shift state in the DX register. If the character is not defined in the tables, the return value is -1 in both the DX and AX registers.

Comments

The export ordinal for this function is 128.

The bits in the shift state returned in the DX register have the following meaning.

Bit Value

1 1 if the SHIFT key is down; 0 otherwise.
2 1 if CTRL and SHIFT is down; 0 otherwise.

This function does not provide translations for characters that require the CTRL+ALT key combination or dead keys.

This function calls VkKeyScan.

See Also

VkKeyScan