Alt code: Difference between revisions

Content deleted Content added
ce
Tag: Reverted
Line 17:
 
===Windows===
'''B̵͍̙̟͌͊͘E̴͚̯̠̺̦̔͋̕A̵̧̹̫͖̗̟̠͇̾́̏́̀̊̽̇N̵̥̥͍̱͙̹̫̺͙̮̥̐̏̀̈̍̃̔̎̚͝ͅͅS̷̡̢͓̦̦̣̥͎̱͉̲͐͋̅̀̎͠'''
 
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 [[Microsoft Windows|Windows]], such as [[CP1252]]. The old code pages were called [[Windows code page#OEM code page|OEM code pages]]; the new ones are called [[Windows code page#ANSI code page|Windows code pages]],{{efn|Initially these were called "ANSI" code pages, but Microsoft has acknowledged that this was a misnomer.}} The familiar Alt+number combinations produced codes from the OEM code page (for example, [[Code page 437#Character set|CP437]] 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,{{efn|Simplifying a bit by not taking 16-bit [[DBCS]] code pages into account here.}} allowing them to be typed as well.
 
For instance, the combination {{key press|Alt}}+{{key press|1}}{{key press|6}}{{key press|3}} would result in {{char|ú}} (Latin letter u with [[acute accent]]) which is at 163 in the OEM code page of CP437 or CP850, while {{key press|Alt}}+{{key press|0}}{{key press|1}}{{key press|6}}{{key press|3}} yields the character {{char|£}} (symbol for the [[pound sterling]]) which is at 163 in CP1252.<ref>{{Cite web |date=2016-07-22 |title=To input characters that are not on your keyboard |url=http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/lang_char_code_input.mspx |url-status=dead |archive-url=https://web.archive.org/web/20160722031546/http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/lang_char_code_input.mspx?mfr=true |archive-date=2016-07-22 |access-date=2022-12-30 |website=Microsoft }}</ref>
 
The numbers 0 –31 and 127 are [[Control character#In Unicode|control characters]] in the Windows code pages. Typing these numbers with a leading zero is ignored.{{citation needed|date=October 2020}}
 
Before Unicode was introduced, most Windows software could only create text using the repertoire of characters available in a single Windows code page. Characters that did not exist in that page (such as a line-drawing graphic from the OEM page) could not be inserted, and either were ignored or produced an unexpected character.{{citation needed|date=March 2019}}
 
====Transition to Unicode====
When Windows later transitioned to Unicode,{{When|date=August 2023|reason=Needs precision about the date (or version) when windows switched to unicode.}} all the characters from both the OEM and Windows code pages were available, actually improving the emulation of the oldest MSDOS Alt codes.
 
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]]-based) like [[Microsoft Office 2010|Word 2010]], [[Wordpad]], and [[PSPad]] operate this way.<ref>{{Cite web |last= |title=About Rich Edit Controls - Win32 apps |url=https://learn.microsoft.com/windows/win32/controls/about-rich-edit-controls |access-date=2022-12-30 |website=learn.microsoft.com |language=en-us}}</ref> Other Windows applications, including [[Notepad]], [[Google Chrome|Chrome]], [[Firefox]], and [[Microsoft Edge]] interpret all numbers greater than 255 [[Modulo operator|modulo]] 256.{{citation needed|date=August 2020}}
 
Because most Unicode documentation and the [[Character Map (Windows)|Character Map]] accessory show the code points in [[base 16|hex]], not decimal, a variation of Alt codes was developed to allow the typing of numbers in hex (using the main keyboard for {{keypress|A}}–{{keypress|F}}). To enable it, a user must set or create a string type ({{code|REG_SZ}}) value called <code>EnableHexNumpad</code> in the [[Windows Registry|registry]] key <code>HKEY_CURRENT_USER\Control&nbsp;Panel\Input&nbsp;Method</code>, assign the value data <code>1</code> to it, and then reboot or log out/in.{{citation needed|date=December 2019}} A leading {{keypress|+}} then indicates hex input, for example {{key press|Alt|+}}{{key press|1|1|B|chain=}} will produce {{char|ě}}&nbsp;(e with [[caron]]).
 
==Problems==