Skip to content

Function: altChar()

cajhin edited this page May 12, 2022 · 3 revisions

altChar ( number )

number any decimal number

or

+hexnumber for Unicode.

This produces special characters by sending "AltGr + NumPadNumber" code to Windows.

This will send:

  1. RALT down
  2. down+up for each digit, virtually typed on the Numpad
  3. RALT up

This requires NumLock=on (Numpad is set to produce numbers).
altChar() will fail with NumLock off ('cursor mode').

This will not clear any pressed modfiers, so if Ctrl-A triggers the function, then Ctrl is down and will mess with the Alt combo.

There are three Windows standards for this:

  • with 3-digit codes, no leading zero 123
  • with 4-digit codes, leading zero 0123
  • leading + like +11D for hexadecimal Unicode

See https://sites.psu.edu/symbolcodes/windows/codealt/ for traditional codes.

See https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input for hex Unicode.
NOTE: hex Unicode input requires the registry entry
HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad 1

Example

Tapped Control, E sends € :

COMBO E [..T.] > altChar(0128)