Alt code: Difference between revisions

Content deleted Content added
No edit summary
MS-DOS: Wrap "for ... see code page" in {{Crossreference}}
Line 8:
On [[IBM PC compatible]] [[personal computer]]s from the 1980s, the [[BIOS]] allowed the user to hold down the {{keypress|Alt}} key and type a decimal number on the keypad. It would place the corresponding code into the keyboard buffer so that 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 an 8-bit character from the current [[code page]] that was inserted into the text the user was typing. On the original [[IBM PC]] the code page was [[CP437]].
 
Some Eastern European, Arabic and Asian computers used other hardware [[code page]]s, and MS-DOS was able to switch between them at runtime with commands like <code>KEYB</code>, <code>[[List of DOS commands#CHCP|CHCP]]</code> or <code>[[List of DOS commands#MODE|MODE]]</code>. This causes the Alt combinations to produce different characters (as well as changing the display of any previously-entered text in the same manner). A 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{{Crossreference|text=; for a more complete list, see ''[[code page]]''}}).
 
PC keyboards designed for non-English use included other methods of inserting these characters, such as national [[keyboard layout]]s, the [[AltGr key]] or [[dead key]]s, but the Alt key was the only method of inserting some characters, and the only method that was the same on all machines, so it remained very popular.{{where|date=October 2020}}{{clarify|reason = Alt codes worked on on computers set to US layout, and also many characters were still not accessible using AltGr|date=October 2020}} This input method is emulated by many pieces of software (such as later versions of MS-DOS and Windows) that do not use the BIOS keyboard decoding.