Non-ASCII keys (function keys, SHIFT keys, extended keys, and, when NUMLOCK
is off, the keypad keys) differ from the ASCII keys in that they send an
identifying code to the input buffer, followed by the key's value. ANSI.SYS
recognizes this and reads the input buffer a second time after receiving
the identifying scan code.
Most keyboards only send the 00H scan code for all non-ASCII keys. Many
extended keyboards send a scan code of 0EH (224 decimal) for the extended
keys and a 00H for the corresponding keypad keys. ANSI.SYS can only detect
the difference between extended and keypad keys with the latter type of
The following example remaps both HOME keys to issue the DIR command on an
extended keyboard. In CONFIG.SYS:
set prompt= $e[0;71;"dir";13p $p$g
The following example remaps the HOME key on the number pad to issue the
DIR command, and the gray HOME key to issue the CLS command on an extended
keyboard. Add the following to the CONFIG.SYS file:
In AUTOEXEC.BAT, add the following:
set prompt= $e[0;71;"dir";13p $e[224;71;"CLS";13p $p$g
NOTE: The lowercase "p" characters in the above command must be lowercase.
In the above commands, the space included before each dollar sign ($) is
optional, and is only added for clarity.