*** Welcome to piglix ***

Alt code


On IBM compatible personal computers, many characters not directly associated with a key can be entered using the Alt Numpad input method or Alt code: pressing and holding the Alt key while typing the number identifying the character with the keyboard's numeric keypad. Similar or extended forms of this feature are also available in many operating systems, including DOS and Microsoft Windows.

Originally on IBM PCs, the user could hold down the Alt key and type a decimal number on the keypad. The system BIOS would place the corresponding code into the keyboard buffer so that, for software using the BIOS for character input, it would look (almost) as if the code had been entered by a single keystroke. Applications reading keystrokes from the BIOS would behave according to what action they associate with that code. Some would interpret the code as a command, but often it would be interpreted as a code to be placed on the screen at the location of the cursor, thus displaying the corresponding 8-bit character from the current code page. On the original IBM PC this was CP437, see that article for a list of the numbers accepted.

Some Eastern European, Arabic and Asian computers use other hardware code pages, and DOS was able to switch between them at runtime with commands like KEYB, CHCP or MODE. This causes the Alt combinations to produce different characters (as well as changing the display of any previously-entered text in the same manner). While most English systems still used CP437, another very common choice in locales using variants of the Latin alphabet was CP850, which provided more Latin character variants. There were, however, many more code pages; for a more complete list, see code page.

These numbers became so well known and memorized by computer users that Microsoft was forced to preserve them even though it used a new and different set of code pages for Windows, such as CP1252. These new code pages were called ANSI code pages by Microsoft, while the old ones were called OEM code pages. Holding Alt and typing three digits (first one non-zero) would attempt to translate the code from the 8-bit OEM code page (for example, CP850) to a matching glyph in the ANSI code page. A leading zero (0) and then a number would produce the character directly from the ANSI code page.


...
Wikipedia

...