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 Alt key, then typing a number on the keyboard's numeric keypad that identifies the character and then releasing Alt.[1]

MS-DOS

On IBM PC compatible personal computers from the 1980s, the BIOS allowed the user to hold down the 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 pages, 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).

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.[where?][clarification needed] 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, for instance, code point 7 is typed by Ctrl+G. While some (most?) applications would insert a bullet character (code point 7 on code page 437), some would treat this identical to Ctrl+G which often was a command for the program.[citation needed]

Windows

The Alt codes had become so well known and memorized by users that Microsoft decided to preserve them in Microsoft Windows, even though the OS features a newer and different set of code pages, such as CP1252. Windows includes the following processing algorithm for Alt code, which supports both methods:

  • The familiar Alt+### combination (where ### is from 0 to 255) retains the old MS-DOS behavior, i.e., generates characters from the legacy code pages now called "OEM code pages." For instance, the combination Alt+163 would result in ú (Latin letter u with acute accent) which is at 163 in the OEM code page of CP437 or CP850.[2] This did not work for characters not in the Windows Code Page (such as box-drawing characters).
  • The new Alt+0### combination (which prefixes a zero to each Alt code), produces characters from the newer "Windows code pages."[lower-alpha 1] For example, Alt+0163 yields the character £ (symbol for the pound sterling) which is at 163 in CP1252.[2][lower-alpha 2]

Unicode

Later versions of Windows and applications such as Microsoft Word supported Unicode. As Unicode included all the characters in the MSDOS code pages, this had the immediate benefit that all the old MSDOS Alt combinations worked, not just the ones that existed in the Windows Code Page.

In the IBM PC Bios typing an Alt code greater than 255 produced the same as that number modulo 256.[3] Some applications retained this behavior, while others (in particular applications using the Windows RichEdit control, such as WordPad and PSPad) made numbers from 256 to 65,535 produce the corresponding Unicode character.[4] For instance, Alt+9731 in WordPad produces the U+2603 SNOWMAN. If the Windows Code Page was set to CP1252 then all Unicode characters except control characters could be typed this way.

Alternatives

Because most Unicode documentation and character tables show the code points in hex, not decimal, a variation of Alt codes was developed to allow the typing of numbers in hex (using the main keyboard for AF). To enable it, a user must set or create a string type (REG_SZ) 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 Alt++11B will produce ě (e with caron).

There are many other ways of typing arbitrary Unicode characters, such as the Character Map utility.

Other operating systems

The Alt key method does not work on ChromeOS, macOS, Linux or other operating systems and there is no evidence of interest in replicating it. However, numeric entry of Unicode characters is possible in most Unix or Unix-like OSs by pressing and releasing Ctrl+⇧ Shift+U, and typing the hex number followed by the space bar or enter key. For example,

Limitations

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.

List of codes

More information Unicode, CP437 ...
UnicodeCP437CP850CP1252Unicode name
  U+00A02550160NO-BREAK SPACE
¡ U+00A11730161INVERTED EXCLAMATION MARK
¢ U+00A21551890162CENT SIGN
£ U+00A31560163POUND SIGN
¤ U+00A42070164CURRENCY SIGN
¥ U+00A51571900165YEN SIGN
¦ U+00A62210166BROKEN BAR
§ U+00A7212450167SECTION SIGN
¨ U+00A82490168DIAERESIS
© U+00A91840169COPYRIGHT SIGN
ª U+00AA1660170FEMININE ORDINAL INDICATOR
« U+00AB1740171LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
¬ U+00AC1700172NOT SIGN
­[lower-alpha 3] U+00AD2400173SOFT HYPHEN
® U+00AE1690174REGISTERED SIGN
¯ U+00AF2380175MACRON
° U+00B02480176DEGREE SIGN
± U+00B12410177PLUS-MINUS SIGN
2 U+00B22530178SUPERSCRIPT TWO
3 U+00B32520179SUPERSCRIPT THREE
´ U+00B42390180ACUTE ACCENT
μ U+00B52300181MICRO SIGN
U+00B6202440182PILCROW SIGN
· U+00B72500183MIDDLE DOT
¸ U+00B82470184CEDILLA
1 U+00B92510185SUPERSCRIPT ONE
º U+00BA1670186MASCULINE ORDINAL INDICATOR
» U+00BB1750187RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
14 U+00BC1720188VULGAR FRACTION ONE QUARTER
12 U+00BD1710189VULGAR FRACTION ONE HALF
34 U+00BE2430190VULGAR FRACTION THREE QUARTERS
¿ U+00BF1680191INVERTED QUESTION MARK
À U+00C01830192LATIN CAPITAL LETTER A WITH GRAVE
Á U+00C11810193LATIN CAPITAL LETTER A WITH ACUTE
 U+00C21820194LATIN CAPITAL LETTER A WITH CIRCUMFLEX
à U+00C31990195LATIN CAPITAL LETTER A WITH TILDE
Ä U+00C41420196LATIN CAPITAL LETTER A WITH DIAERESIS
Å U+00C51430197LATIN CAPITAL LETTER A WITH RING ABOVE
Æ U+00C61460198LATIN CAPITAL LETTER AE
Ç U+00C71280199LATIN CAPITAL LETTER C WITH CEDILLA
È U+00C82120200LATIN CAPITAL LETTER E WITH GRAVE
É U+00C91440201LATIN CAPITAL LETTER E WITH ACUTE
Ê U+00CA2100202LATIN CAPITAL LETTER E WITH CIRCUMFLEX
Ë U+00CB2110203LATIN CAPITAL LETTER E WITH DIAERESIS
Ì U+00CC2220204LATIN CAPITAL LETTER I WITH GRAVE
Í U+00CD2140205LATIN CAPITAL LETTER I WITH ACUTE
Î U+00CE2150206LATIN CAPITAL LETTER I WITH CIRCUMFLEX
Ï U+00CF2160207LATIN CAPITAL LETTER I WITH DIAERESIS
Ð U+00D02090208LATIN CAPITAL LETTER ETH
Ñ U+00D11650209LATIN CAPITAL LETTER N WITH TILDE
Ò U+00D22270210LATIN CAPITAL LETTER O WITH GRAVE
Ó U+00D32240211LATIN CAPITAL LETTER O WITH ACUTE
Ô U+00D42260212LATIN CAPITAL LETTER O WITH CIRCUMFLEX
Õ U+00D52290213LATIN CAPITAL LETTER O WITH TILDE
Ö U+00D61530214LATIN CAPITAL LETTER O WITH DIAERESIS
× U+00D71580215MULTIPLICATION SIGN
Ø U+00D81570216LATIN CAPITAL LETTER O WITH STROKE
Ù U+00D92350217LATIN CAPITAL LETTER U WITH GRAVE
Ú U+00DA2330218LATIN CAPITAL LETTER U WITH ACUTE
Û U+00DB2340219LATIN CAPITAL LETTER U WITH CIRCUMFLEX
Ü U+00DC1540220LATIN CAPITAL LETTER U WITH DIAERESIS
Ý U+00DD2370221LATIN CAPITAL LETTER Y WITH ACUTE
Þ U+00DE2320222LATIN CAPITAL LETTER THORN
ß U+00DF2250223LATIN SMALL LETTER SHARP S
à U+00E01330224LATIN SMALL LETTER A WITH GRAVE
á U+00E11600225LATIN SMALL LETTER A WITH ACUTE
â U+00E21310226LATIN SMALL LETTER A WITH CIRCUMFLEX
ã U+00E31980227LATIN SMALL LETTER A WITH TILDE
ä U+00E41320228LATIN SMALL LETTER A WITH DIAERESIS
å U+00E51340229LATIN SMALL LETTER A WITH RING ABOVE
æ U+00E61450230LATIN SMALL LETTER AE
ç U+00E71350231LATIN SMALL LETTER C WITH CEDILLA
è U+00E81380232LATIN SMALL LETTER E WITH GRAVE
é U+00E91300233LATIN SMALL LETTER E WITH ACUTE
ê U+00EA1360234LATIN SMALL LETTER E WITH CIRCUMFLEX
ë U+00EB1370235LATIN SMALL LETTER E WITH DIAERESIS
ì U+00EC1410236LATIN SMALL LETTER I WITH GRAVE
í U+00ED1610237LATIN SMALL LETTER I WITH ACUTE
î U+00EE1400238LATIN SMALL LETTER I WITH CIRCUMFLEX
ï U+00EF1390239LATIN SMALL LETTER I WITH DIAERESIS
ð U+00F02080240LATIN SMALL LETTER ETH
ñ U+00F11640241LATIN SMALL LETTER N WITH TILDE
ò U+00F21490242LATIN SMALL LETTER O WITH GRAVE
ó U+00F31620243LATIN SMALL LETTER O WITH ACUTE
ô U+00F41470244LATIN SMALL LETTER O WITH CIRCUMFLEX
õ U+00F52280245LATIN SMALL LETTER O WITH TILDE
ö U+00F61480246LATIN SMALL LETTER O WITH DIAERESIS
÷ U+00F72460247DIVISION SIGN
ø U+00F81550248LATIN SMALL LETTER O WITH STROKE
ù U+00F91510249LATIN SMALL LETTER U WITH GRAVE
ú U+00FA1630250LATIN SMALL LETTER U WITH ACUTE
û U+00FB1500251LATIN SMALL LETTER U WITH CIRCUMFLEX
ü U+00FC1290252LATIN SMALL LETTER U WITH DIAERESIS
ý U+00FD2360253LATIN SMALL LETTER Y WITH ACUTE
þ U+00FE2310254LATIN SMALL LETTER THORN
ÿ U+00FF1520255LATIN SMALL LETTER Y WITH DIAERESIS
ı U+0131213LATIN SMALL LETTER DOTLESS I
Œ U+01520140LATIN CAPITAL LIGATURE OE
œ U+01530156LATIN SMALL LIGATURE OE
Š U+01600138LATIN CAPITAL LETTER S WITH CARON
š U+01610154LATIN SMALL LETTER S WITH CARON
Ÿ U+01780159LATIN CAPITAL LETTER Y WITH DIAERESIS
Ž U+017D0142LATIN CAPITAL LETTER Z WITH CARON
ž U+017E0158LATIN SMALL LETTER Z WITH CARON
ƒ U+01921590131LATIN SMALL LETTER F WITH HOOK
ˆ U+02C60136MODIFIER LETTER CIRCUMFLEX ACCENT
˜ U+02DC0152SMALL TILDE
Γ U+0393226GREEK CAPITAL LETTER GAMMA
Θ U+0398233GREEK CAPITAL LETTER THETA
Σ U+03A3228GREEK CAPITAL LETTER SIGMA
Φ U+03A6232GREEK CAPITAL LETTER PHI
Ω U+03A9234GREEK CAPITAL LETTER OMEGA
α U+03B1224GREEK SMALL LETTER ALPHA
δ U+03B4235GREEK SMALL LETTER DELTA
ε U+03B5238GREEK SMALL LETTER EPSILON
π U+03C0227GREEK SMALL LETTER PI
σ U+03C3229GREEK SMALL LETTER SIGMA
τ U+03C4231GREEK SMALL LETTER TAU
φ U+03C6237GREEK SMALL LETTER PHI
U+20130150EN DASH
U+20140151EM DASH
U+2017242DOUBLE LOW LINE
U+20180145LEFT SINGLE QUOTATION MARK
U+20190146RIGHT SINGLE QUOTATION MARK
U+201A0130SINGLE LOW-9 QUOTATION MARK
U+201C0147LEFT DOUBLE QUOTATION MARK
U+201D0148RIGHT DOUBLE QUOTATION MARK
U+201E0132DOUBLE LOW-9 QUOTATION MARK
U+20200134DAGGER
U+20210135DOUBLE DAGGER
U+202270149BULLET
... U+20260133HORIZONTAL ELLIPSIS
U+20300137PER MILLE SIGN
U+20390139SINGLE LEFT-POINTING ANGLE QUOTATION MARK
U+203A0155SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
U+203C19DOUBLE EXCLAMATION MARK
n U+207F252SUPERSCRIPT LATIN SMALL LETTER N
U+20A7158PESETA SIGN
U+20AC0128EURO SIGN
U+21220153TRADE MARK SIGN
U+219027LEFTWARDS ARROW
U+219124UPWARDS ARROW
U+219226RIGHTWARDS ARROW
U+219325DOWNWARDS ARROW
U+219429LEFT RIGHT ARROW
U+219518UP DOWN ARROW
U+21A823UP DOWN ARROW WITH BASE
U+2219249BULLET OPERATOR
U+221A251SQUARE ROOT
U+221E236INFINITY
U+221F28RIGHT ANGLE
U+2229239INTERSECTION
U+2248247ALMOST EQUAL TO
U+2264243LESS-THAN OR EQUAL TO
U+2261240IDENTICAL TO
U+2265242GREATER-THAN OR EQUAL TO
U+2302127HOUSE
U+2310169REVERSED NOT SIGN
U+2320244TOP HALF INTEGRAL
U+2321245BOTTOM HALF INTEGRAL
U+2500196BOX DRAWINGS LIGHT HORIZONTAL
U+2502179BOX DRAWINGS LIGHT VERTICAL
U+250C218BOX DRAWINGS LIGHT DOWN AND RIGHT
U+2510191BOX DRAWINGS LIGHT DOWN AND LEFT
U+2514192BOX DRAWINGS LIGHT UP AND RIGHT
U+2518217BOX DRAWINGS LIGHT UP AND LEFT
U+251C195BOX DRAWINGS LIGHT VERTICAL AND RIGHT
U+2524180BOX DRAWINGS LIGHT VERTICAL AND LEFT
U+252C194BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
U+2534193BOX DRAWINGS LIGHT UP AND HORIZONTAL
U+253C197BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
U+2550205BOX DRAWINGS DOUBLE HORIZONTAL
U+2551186BOX DRAWINGS DOUBLE VERTICAL
U+2552213BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
U+2553214BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
U+2554201BOX DRAWINGS DOUBLE DOWN AND RIGHT
U+2555184BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
U+2556183BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
U+2557187BOX DRAWINGS DOUBLE DOWN AND LEFT
U+2558212BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
U+2559211BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
U+255A200BOX DRAWINGS DOUBLE UP AND RIGHT
U+255B190BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
U+255C189BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
U+255D188BOX DRAWINGS DOUBLE UP AND LEFT
U+255E198BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
U+255F199BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
U+2560204BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
U+2562182BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
U+2563185BOX DRAWINGS DOUBLE VERTICAL AND LEFT
U+2564209BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
U+2565210BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
U+2566203BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
U+2567207BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
U+2568208BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
U+2569202BOX DRAWINGS DOUBLE UP AND HORIZONTAL
U+256A216BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
U+256B215BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
U+256C206BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
U+2580223UPPER HALF BLOCK
U+2584220LOWER HALF BLOCK
U+2588219FULL BLOCK
U+258C221LEFT HALF BLOCK
U+2590222RIGHT HALF BLOCK
U+2591176LIGHT SHADE
U+2592177MEDIUM SHADE
U+2593178DARK SHADE
U+25A0254BLACK SQUARE
U+25AC22BLACK RECTANGLE
U+25B230BLACK UP-POINTING TRIANGLE
U+25BA16BLACK RIGHT-POINTING POINTER
U+25BC31BLACK DOWN-POINTING TRIANGLE
U+25C417BLACK LEFT-POINTING POINTER
U+25CB9WHITE CIRCLE
U+25D88INVERSE BULLET
U+25D910INVERSE WHITE CIRCLE
U+263A1WHITE SMILING FACE
U+263B2BLACK SMILING FACE
U+263C15WHITE SUN WITH RAYS
U+264012FEMALE SIGN
U+264211MALE SIGN
U+26606BLACK SPADE SUIT
U+26635BLACK CLUB SUIT
U+26653BLACK HEART SUIT
U+26664BLACK DIAMOND SUIT
U+266A13EIGHTH NOTE
U+266B14BEAMED EIGHTH NOTES
Close

See also

Notes

  1. Microsoft initially referred to them as "ANSI" code pages, but later acknowledged that this as a misnomer.
  2. But if the user has, for, example, the code page CP1253 (Cyrillic) in use, where the symbol at codepoint 163 is Je (Cyrillic) (Ј), it is this and not £ that will be displayed.
  3. Only visible at a line break that falls between syllables of a word, where it appears as a hyphen-minus, -.

References

Wikiwand in your browser!

Seamless Wikipedia browsing. On steroids.

Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.

Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.