Académique Documents
Professionnel Documents
Culture Documents
From Wikipedia, the free encyclopedia
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
Animation showing the sequence of keys to press to enter the
feature are also available in many operating systems,
Alt code 161, producing the character "í" (Latin letter i with
including DOS and Microsoft Windows.
acute accent). The Alt key is held down while entering the
Often this is the best or only method many computer digits on the numeric keypad.
users know for entering nonASCII characters. Many
Wikipedia articles on various characters will include how to type that character using Alt codes for code page 437.
Contents
1 History and description
2 Problems
3 Linux
4 See also
5 External links
History and description
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 8bit character from the current code page. Without other
software loaded, this is the socalled hardware code page, which is code page 437 for original IBM PCs and most
other computer systems using English. Some Eastern European, Arabic and Asian computers use other hardware
code pages, however.
When an operating system like DOS was used, it became possible to override the hardware code page with a
variety of other code pages and even switch between them at runtime with commands like KEYB, CHCP or MODE.
While most English systems still used code page 437 under DOS, another very common choice in locales using
variants of the Latin alphabet was code page 850, which provided more Latin character variants than code page
437. 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 code page 1252. 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 nonzero) would attempt to translate the code from the 8bit OEM code page
(for example, code page 850) 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.
When Windows later transitioned to Unicode, the 0leading codes had become so well known as well that a third
method needed to be invented to produce Unicode codepoints. Although code page 1252 is quite close to the start
of Unicode and it would seem logical to just allow larger numbers to be typed, other international sets did not
match, and some users were accustomed to numbers larger than 255 being translated modulus 256. Nevertheless,
some applications like Word 2010 or PSPad 4.5.6 interpret alt codes larger than 255 directly as a decimal Unicode
codepoint.
To enable the third method, a user must set or create the registry key HKCU\Control Panel\Input
Method\EnableHexNumpad with type REG_SZ to value 1 and reboot (logging out and logging back in is sufficient).
Once the registry key is set, the following method can be used to enter Unicode codepoints:
The transition to Unicode actually made the older legacy Alt codes (the ones with no leading zero) more reliable,
as all the glyphs in the legacy code pages have matching glyphs in Unicode, so they all work.
Thirdparty software can be run on Windows to replace the default keyboard handling to allow more possible ways
of input, such as typing in number systems other than base 10. Modern input methods for foreign languages often
have much more userfriendly methods of choosing characters, such as picking them off a popup window or using
mnemonic sequences of letters, however the Alt key combinations remain very popular and often the only scheme
a user knows for entering letters that are not on their keyboard.
Problems
If Num lock is disabled, attempting an Alt code may cause unexpected results in some applications, due to the
controls used on the same key. For example, Alt + 4 can be taken as Alt + ← , causing a web browser to go back
one page.
Many laptops do not have a separate numeric keypad, but may provide Numpad input by holding a modifier key
(typically labelled "Fn"); thus one must press and hold both Alt and Fn keys while entering the character code.
Linux
The Alt key method does not work on Linux systems and there seems to be little interest in replicating it, due to it
including the dated IBM PC character encoding as part of its definition. Numeric entry of Unicode is done by the
application or UI toolkit library has been somewhat standardized though there are slight variations. Sometimes all
three of these work (for instance in Firefox):
In OpenOffice.org and Inkscape, for example, only the second method works. In GTK only the third method
works.
See also
Compose key for other operating systems
Numeric character reference
Unicode input
Combining character
List of Unicode characters
External links
How to enter Unicode characters in Microsoft Windows (http://www.fileformat.info/tip/microsoft/enter_unic
ode.htm)
Windows Alt Key Numeric Codes (http://symbolcodes.tlt.psu.edu/accents/codealt.html)
Alt Codes (http://www.altcodes.net/)
Retrieved from "https://en.wikipedia.org/w/index.php?title=Alt_code&oldid=724399157"
This page was last modified on 9 June 2016, at 00:56.
Text is available under the Creative Commons AttributionShareAlike License; additional terms may apply.
By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark
of the Wikimedia Foundation, Inc., a nonprofit organization.