DWORD OemKeyScan(wOemChar)
This function maps OEM ASCII codes 0 through 0x0FF into the OEM scan codes and shift states. It provides information which allows a program to send OEM text to another program by simulating keyboard input and is used specifically for this purpose by Windows in 386 enhanced mode.
Parameter | Type/Description |
wOemChar | WORD Specifies the ASCII value of the OEM character. |
The return value contains in its low-order word the scan code of the OEM character identified by the wOemChar parameter. The high-order word of the return value contains flags which indicate the shift state. The following lists the flag bits and their meanings:
Bit | Meaning |
2 | CTRL key is pressed. |
1 | Either SHIFT key is pressed. |
If the character is not defined in the OEM character tables, both the low-order and high-order words of the return value contain –1.
This function does not provide translations for characters which require CTRL-ALT or dead keys. Characters not translated by this function must be copied by simulating input using the “ALT + keypad” mechanism. The NUMLOCK key must be off.
This function calls the VkKeyScan function in recent versions of the keyboard drivers.