Using the Numeric Keypad

As you probably know, the IBM PC keyboard and BIOS let you enter codes for the IXC extended character set by pressing and holding down the Alt key, typing on the numeric keypad the three-digit decimal code representing the OEM character, and releasing the Alt key. This facility is duplicated in Windows in two ways:

First, when you type Alt-[OEM code] on the numeric keypad, Windows gives to you the ANSI character code in the wParam parameter of the WM_CHAR message that most closely approximates the OEM character represented by the OEM code. That is, Windows passes the code through the OemToAnsi function before generating the WM_CHAR message. This facility is for the user's convenience: If you do not have a foreign-language keyboard and you are accustomed to typing a \UU by typing Alt-154, you can do the same thing in a Windows program. You don't need to relearn the ANSI character codes.

Second, if you want to generate ANSI extended character codes from the U.S. keyboard, type Alt-0[OEM code] on the numeric keypad. The wParam parameter of the WM_CHAR message is that OEM code. Thus, Alt-0220 is also a \UU. You can try this out in the TYPE program.