1

If I hold Alt, and press 0, 1, 4, then 9, I get a bullet (•).

If I hold Alt, then press 7, I get a bullet (•).

I've been doing it the first way, but recently came across the second keyboard shortcut. Both seem to work and give the same result.

Practically speaking, have I just been wasting keystrokes, or is there a reason to use one key combination versus the other? Do they both work on different operating systems, or is one more reliable than the other?

phuclv
  • 30,396
  • 15
  • 136
  • 260
azoundria
  • 869

1 Answers1

3

Yes. When holding Alt, the first numpad key defines the type of code page to use

  • If it's numpad 1-9 then the DOS code page (A.K.A OEM code page) will be used

    The default OEM code page on US Windows is CP437, so if you type Alt+7 then code point 7 in CP437 (which is U+2022 if you check the CP437 table in the previous link) will be typed in

  • If it's numpad 0 then the Windows code page (A.K.A ANSI code page) will be used

    By default the Windows code page is CP1252 on US Windows. So if you type Alt+0149 then code point 149 in CP1252 will be typed in, which is also a U+2022 bullet

    In fact Alt code originates from the DOS era, and people are so used to the Alt code in DOS that Microsoft can't break it when they use ANSI code pages in Windows and must differentiate the two with the 0 prefix

  • If it's numpad + then input is hexadecimal UCS2/UTF-16

    Typing Alt++2022 gives you the same bullet character

    Note that this requires the hexnumpad to be enabled by setting a REG_SZ value with name EnableHexNumpad in the HKCU\Control Panel\Input Method registry key then reboot

See also Which character encoding is used for ALT-codes?


Practically speaking, have I just been wasting keystrokes, or is there a reason to use one key combination versus the other?

They're all the same, so use the shorter one to save keystrokes

Do they both work on different operating systems,

Alt codes are Windows-specific. Other OSes use different ways to enter arbitrary characters. For more details read Do other OS's support ALT-codes?

or is one more reliable than the other?

Only hex numpad with Alt++ is reliable because it enters Unicode characters. Different languages use different ANSI and OEM code pages by default, and both can be changed easily so the output may differ from one computer to another if you use the normal decimal Alt code

phuclv
  • 30,396
  • 15
  • 136
  • 260