Windows 3.1 Device Drivers (ddag31qh.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
OEMKeyScan
                                                     Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
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  Description
────────────────────────────────────────────────────────────────────────────
 
 
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