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.

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).

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:

  • The familiar Alt+### combination retains the old MS-DOS behavior, i.e., generates characters from the legacy code pages now called "OEM code pages". For instance Alt+163 produces ⟨ú⟩ from code point 163 in CP437 or CP850. The "OEM code page" selection served little or no other purpose other than to control what Alt codes produced, if other code pages were selected then these numbers could produce different characters, but it did not change the display. It was impossible to type characters that were not in the Windows code page, such as box-drawing symbols.
  • The new Alt+0### combination (which prefixes a zero to each Alt code) produces characters using the Windows code page. For instance Alt+0163 results in ⟨£⟩ (when CP1252 is active) because it occupies position 163 in CP1252. The active Windows code page depends on the current input locale (keyboard layout) and may vary, which can change the effect of these Alt codes.

Unicode

Later versions of Windows and applications such as Microsoft Word added support for Unicode. In some applications this had the benefit that all the "old" Alt combinations, for instance for line-drawing characters, worked again.

Setting the Windows Code Page to CP1252 made the zero-prefixed numbers 32-126 and 160-255 produce the matching code point from Unicode.

In the IBM PC BIOS, typing an Alt code greater than 255 produced the same as that number modulo 256. 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. For instance, Alt+9731 in WordPad produces the U+2603☃ SNOWMAN.

Hex Alt Codes

Because most Unicode documentation and character tables show code points in hexadecimal rather than decimal, Windows added a mechanism to input Alt codes in hexadecimal form. To enable it, a user must set or create a string (REG_SZ) value called EnableHexNumpad in the registry key HKEY_CURRENT_USER\Control Panel\Input Method, assign the value data 1, and then reboot or log out/in.

When enabled, holding Alt and pressing + on the numeric keypad enters hexadecimal Unicode input mode. The digits are entered using the numeric keypad, while the letters AF are typed on the main keyboard. For example, Alt++11B produces U+011Bě LATIN SMALL LETTER E WITH CARON. The input value is accumulated into a 16-bit value, so only the lower 16 bits are used; effectively, this limits input to Unicode BMP characters (up to four hexadecimal digits), with excess digits being truncated. This did not work in all applications or user interface elements.

Windows also supports an alternative hexadecimal input mode (less commonly documented) where Alt+. on the numeric keypad enters a mode that interprets the value using the Windows code page.

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,

  • For the registered trademark symbol ®, type Ctrl+⇧ Shift+U, AE, ↵ Enter.
  • For the no entry sign ⛔, type Ctrl+⇧ Shift+U, 26D4, ↵ Enter.

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

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
­U+00AD2400173SOFT HYPHEN
®U+00AE1690174REGISTERED SIGN
¯U+00AF2380175MACRON
°U+00B02480176DEGREE SIGN
±U+00B12410177PLUS-MINUS SIGN
2U+00B22530178SUPERSCRIPT TWO
3U+00B32520179SUPERSCRIPT THREE
´U+00B42390180ACUTE ACCENT
μU+00B52300181MICRO SIGN
U+00B6202440182PILCROW SIGN
·U+00B72500183MIDDLE DOT
¸U+00B82470184CEDILLA
1U+00B92510185SUPERSCRIPT ONE
ºU+00BA1670186MASCULINE ORDINAL INDICATOR
»U+00BB1750187RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
1⁄4U+00BC1720188VULGAR FRACTION ONE QUARTER
1⁄2U+00BD1710189VULGAR FRACTION ONE HALF
3⁄4U+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
nU+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

See also

Notes