dan@srs.UUCP (02/15/87)
In response to whoever needed to know:
---- MSDOS's ANSI.SYS keyboard programming ----
IBMKKR Keyboard Key Redefinition ESC["string"p
The first char of the string gives the key to redefine; the rest
of the string is the key's new value.
To specify unprintable chars, give the ASCII value of the char
outside of quotes, as a normal parameter.
IBM function keys are two byte strings; see the Appendix below.
For instance, ESC[0;68;"dir a:";13p redefines function key 10 to
have the value "dir a:" followed by the ENTER key.
IBM PC Extended Keyboard Codes
When a function key (or special key combination) is pressed, the
IBM keyboard returns two bytes; the first byte is zero, and
the second byte is as follows:
Keystroke Decimal Code
plain F1 ... F10 59 ... 68
SHIFT F1 ... F10 84 ... 93
CTRL F1 ... F10 94 ... 103
ALT F1 ... F10 104 ... 113
ALT QWERTYUIOP 16 ... 25
ALT ASDFGHJKL 30 ... 38
ALT ZXCVBNM 44 ... 50
ALT 1234567890-= 120 ... 131
Up, Down 72, 80
Left, Right 75, 77
CTRL Left, Right 115, 116
Home, PgUp 71, 73
CTRL Home, PgUp 119, 132
End, PgDn 79, 81
CTRL End, PgDn 117, 118
Insert, Delete 82, 83
Thus, to redefine ALT-A to mean "Alfred E. Neumann <CR>", the
command is
ESC [0;30;"Alfred E. Neumann";13p