HOME

TheInfoList



OR:

On personal computers with numeric keypads that use Microsoft operating systems, such as Windows, many characters that do not have a dedicated key combination on the keyboard may nevertheless be entered using the Alt code (the Alt numpad input method). This is done by pressing and holding the key, then typing a number on the keyboard's numeric keypad that identifies the character and then releasing .


History and description


MS DOS

On IBM PC compatible personal computers from the 1980s, the
BIOS In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is firmware used to provide runtime services for operating systems and programs and to perform hardware initialization during the ...
allowed the user to hold down the 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 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 In computing, a code page is a character encoding and as such it is a specific association of a set of printable characters and control characters with unique numbers. Typically each number represents the binary value in a single byte. (In some co ...
. On the original
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
this was
CP437 Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters as well as some accented letters (diacr ...
. In most cases typing a number greater than 255 produced the character associated with the remainder after the number is divided by 256. Some Eastern European, Arabic and Asian computers used other hardware
code page In computing, a code page is a character encoding and as such it is a specific association of a set of printable characters and control characters with unique numbers. Typically each number represents the binary value in a single byte. (In some co ...
s, and MS-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). 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; for a more complete list, see ''
code page In computing, a code page is a character encoding and as such it is a specific association of a set of printable characters and control characters with unique numbers. Typically each number represents the binary value in a single byte. (In some co ...
''). PC keyboards designed for non-English use included other methods of inserting these characters, such as national keyboard layouts, the AltGr key or dead keys, 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. 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. In the ASCII standard, the numbers 0-31 and 127 are assigned to
control characters In computing and telecommunication, a control character or non-printing character (NPC) is a code point (a number) in a character set, that does not represent a written symbol. They are used as in-band signaling to cause effects other than the ...
, but MS DOS did not interpret the numbers this way. For instance, code point 7 is assigned to
BEL BEL can be an abbreviation for: * The ISO 3166-1 alpha-3 country code for Belgium * ''BEL'' or bell character in the C0 control code set * Belarusian language, in the ISO 639-2 and SIL country code lists * Bharat Electronics Limited, an Indian stat ...
. However with some applications, may yield a
bullet A bullet is a kinetic projectile, a component of firearm ammunition that is shot from a gun barrel. Bullets are made of a variety of materials, such as copper, lead, steel, polymer, rubber and even wax. Bullets are made in various shapes and co ...
character (code point 7 on
code page 437 Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters as well as some accented letters (diacri ...
), but in others would treat this input as identical to (which on a terminal produces a control character with a value of 7).


Windows

The Alt codes had become so well known and memorized by users that Microsoft decided to preserve them, even though it used a new and different set of code pages for Windows, such as CP1252. The old code pages were called OEM code pages; the new ones are called Windows code pages, The familiar Alt+number combinations produced codes from the OEM code page (for example,
CP437 Code page 437 (CCSID 437) is the character set of the original IBM PC (personal computer). It is also known as CP437, OEM-US, OEM 437, PC-8, or DOS Latin US. The set includes all printable ASCII characters as well as some accented letters (diacr ...
in the United States), matching the results from MS-DOS. But prefixing a leading zero (0) to the number (usually meaning 4 digits) produced the character specified by the newer Windows code page, allowing them to be typed as well. For instance, the combination + would result in (Latin letter u with
acute accent The acute accent (), , is a diacritic used in many modern written languages with alphabets based on the Latin, Cyrillic, and Greek scripts. For the most commonly encountered uses of the accent in the Latin and Greek alphabets, precomposed ch ...
) which is at 163 in the OEM code page of CP437 or CP850, while + yields the character (symbol for the
pound sterling Sterling (abbreviation: stg; Other spelling styles, such as STG and Stg, are also seen. ISO code: GBP) is the currency of the United Kingdom and nine of its associated territories. The pound ( sign: £) is the main unit of sterling, and t ...
) which is at 163 in CP1252. The numbers 0 –31 and 127 are
control characters In computing and telecommunication, a control character or non-printing character (NPC) is a code point (a number) in a character set, that does not represent a written symbol. They are used as in-band signaling to cause effects other than the ...
in the Windows code pages. Typing these numbers with a leading zero is ignored. Before Unicode was introduced, most Windows software could only create text using the repertoire of characters available in a single code page. Characters that did not exist in that page (such as a line-drawing graphic from the OEM page when the software was using the Windows code page) could not be inserted, and either were ignored or produced an unexpected character. Modern software uses Unicode, which assigns numbers ( code points) to all the characters in all the code pages. The software has access to the glyphs corresponding to all the code points in the supported fonts, so it can produce the character specified by any Alt code less than 256 whether zero-prefixed or non-zero-prefixed.


Transition to Unicode

When Windows later transitioned to Unicode, there was a desire to extend the Alt codes to allow entry of any Unicode code point. Numbers greater or equal to 256 pick the corresponding Unicode code point (lower numbers continue to pick characters from the OEM or ANSI code pages, but if 0 is prefixed the ANSI code page greatly resembles the first 256 characters of Unicode). Some applications (
RichEdit The Text Object Model (TOM) is a Microsoft Windows API that provides developers with object-based rich text manipulation interfaces. It is implemented through COM, and can be accessed through Microsoft Word or additionally through the RichEdit cont ...
-based) like Word 2010, Wordpad, and PSPad operate this way. Other Windows applications, including Notepad,
Chrome Chrome may refer to: Materials * Chrome plating, a process of surfacing with chromium * Chrome alum, a chemical used in mordanting and photographic film Computing * Google Chrome, a web browser developed by Google ** ChromeOS, a Google Chrome- ...
, Firefox, and Microsoft Edge interpret all numbers greater than 255
modulo In computing, the modulo operation returns the remainder or signed remainder of a division, after one number is divided by another (called the '' modulus'' of the operation). Given two positive numbers and , modulo (often abbreviated as ) is t ...
256. Because most Unicode documentation and the Character Map accessory show the code points in
hex Hex or HEX may refer to: Magic * Hex, a curse or supposed real and potentially supernaturally realized malicious wish * Hex sign, a barn decoration originating in Pennsylvania Dutch regions of the United States * Hex work, a Pennsylvania Dutch ...
, not decimal, a variation of Alt codes was developed to allow the numbers to be typed in hex (using the main keyboard for –). To enable it, a user must set or create a string type () value called EnableHexNumpad in the registry key HKEY_CURRENT_USER\Control Panel\Input Method, assign the value data 1 to it, and then reboot or log out/in. A leading then indicates hex input, for example will produce  (e with caron). Many applications, including Word, Wordpad,
Excel ExCeL London (an abbreviation for Exhibition Centre London) is an exhibition centre, international convention centre and former hospital in the Custom House area of Newham, East London. It is situated on a site on the northern quay of the ...
, and LibreOffice, support a simpler method: typing the hex digits first (inserting them into the document) and then typing to change them into the matching Unicode character.


Problems

If is disabled, attempting an Alt code may cause unexpected results in some applications, due to the controls used on the same key. For example, can be taken as , causing a web browser to go back one page. Many laptops do not have a separate numeric keypad, but some may provide numpad input by holding a modifier key (typically labelled "Fn"); thus one must press and hold both and keys while entering the character code. One limitation of the Alt code feature is that the key and the numpad keys being used to enter the code must both be on the same keyboard device. Users with keyboards that lack a numpad (e.g. tenkeyless designs) cannot use a separate numpad device to enter Alt codes while holding the key on their main keyboard.


Other operating systems

The Alt key method does not work on ChromeOS, macOS, Linux or other operating systems and there is no readily-accessible evidence of interest in replicating it, due to its including the 1980s
IBM PC The IBM Personal Computer (model 5150, commonly known as the IBM PC) is the first microcomputer released in the IBM PC model line and the basis for the IBM PC compatible de facto standard. Released on August 12, 1981, it was created by a team ...
character encoding as part of its definition. However, numeric entry of Unicode characters is possible in most Unix or Unix-like OSs by typing , (release) then the hex number, then the space bar or enter key. For example, * for the
registered trademark symbol The registered trademark symbol, , is a typographic symbol that provides notice that the preceding word or symbol is a trademark or service mark that has been registered with a national trademark office. A trademark is a symbol, word, or word ...
, type ; * for the no entry sign , type


Alternatives

Alternative systems exist for users to make characters without selecting them by number, for example using a popup window that lets a user choose the desired character by clicking on it. Examples include the Windows Character Map or the Insert Character facility in MsOffice. See Unicode input for more.


List of codes


See also

*
Combining character In digital typography, combining characters are characters that are intended to modify other characters. The most common combining characters in the Latin script are the combining diacritical marks (including combining accents). Unicode also ...
*
Compose key A compose key (sometimes called multi key) is a key on a computer keyboard that indicates that the following (usually 2 or more) keystrokes trigger the insertion of an alternate character, typically a precomposed character or a symbol. For insta ...
for other operating systems * Keyboard layout * List of Unicode characters * Numeric character reference


Notes


References

{{Reflist Character encoding Computer keyboards Input methods de:Alt (Taste)#Alt-Code