Dec 172017
 
Adds enhanced keycodes to non-enhanced keyboards (PCMag).
File NEWKEYS2.ZIP from The Programmer’s Corner in
Category Files from Magazines
Adds enhanced keycodes to non-enhanced keyboards (PCMag).
File Name File Size Zip Size Zip Type
NEWKEYS.ASM 4386 1644 deflated
NEWKEYS.COM 142 136 deflated
NEWKEYS.DOC 5296 1581 deflated

Download File NEWKEYS2.ZIP Here

Contents of the NEWKEYS.DOC file


NEWKEYS.DOC From PC Magazine Volume 6, No. 13 July 1987
"PC Tutor" Page 479 by Charles Petzold

Version 2, 8/1/89, by Tim Farley.

When IBM designed the BIOS support for the enhanced keyboard, they added
over 30 new extended keyboard codes, starting at 133. However, they did not
make these available to programs through the normal BIOS keyboard interface.
To do so would have created incompatiblities with some existing programs. For
instance, some macro programs define their own extended keys and these may
conflict with the new IBM codes.

DOS (and most programs) get keyboard information from BIOS through interrupt
16h, function calls 0, 1, and 2. For the enhanced keyboard, IBM defined new
function calls numbered 10h, 11h, and 12h that duplicate 0, 1, and 2, except
that the new calls also return the new extended keyboard codes in addition to
the old ones.

NEWKEYS.COM is a terminate-and-stay resident program, so it need be loaded
only once during your PC session. Like most TSRs, it may have some compatibilty
problems with other programs. If everything seems OK once you load it, then
you're probably in good shape.

When NEWKEYS is loaded, you can use the extra keyboard codes for ANSI.SYS
redefinitions. The new codes are shown in Figure 1. (The old codes can be
obtained from the IBM BASIC manual.) For instance, the ANSI sequence for
redefining the F11 key to do a DIR command is

[0;133;"DIR";13p


+-----------------------------------------------------------+
| |
| Extended Extended |
| Code Key Code Key |
| -------- --- -------- --- |
| 133 F11 149 Ctrl / |
| 134 F12 150 Ctrl * |
| 135 Shift F11 151 Alt Home |
| 136 Shift F12 152 Alt Up-Arrow |
| 137 Ctrl F11 153 Alt Page-Up |
| 138 Ctrl F12 155 Alt Left-Arrow |
| 139 Alt F11 157 Alt Right-Arrow |
| 140 Alt F12 159 Alt End |
| 141 Ctrl Up-Arrow 160 Alt Down-Arrow |
| 142 Ctrl - 161 Alt Page-Down |
| 143 Ctrl 5 162 Alt Insert |
| 144 Ctrl + 163 Alt Delete |
| 145 Ctrl Down-Arrow 164 Alt / |
| 146 Ctrl Insert 165 Alt Tab |
| 147 Ctrl Delete 166 Alt Enter |
| 148 Ctrl Tab |
| |
+-----------------------------------------------------------+
Figure 1


Version 2 corrects a problem with the first version that would strip the IBM
extended ASCII code "alpha" (character code decimal 224) when typed at the
keyboard using the Alt key with the numeric keypad. Changes in the source
code are noted, some additional comments were added.

Through experimentation, these additional Extended codes have been found to
work on a true-blue IBM AT, in addition to the ones listed above:


+-----------------------------------------------------------+
| |
| Extended |
| Code Key |
| -------- --- |
| 1 Alt Escape |
| 14 Alt Backspace |
| 26 Alt Left Bracket ("[") |
| 27 Alt Right Bracket ("]") |
| 28 Alt Enter (Main Keyboard RETURN key) |
| 39 Alt Semicolon (";") |
| 40 Alt Single Quote ("'") |
| 41 Alt Grave Accent ("`") |
| 43 Alt Backslash ("\") |
| 51 Alt Comma (",") |
| 52 Alt Period (".") (Main Keyboard) |
| 53 Alt Slash ("/") (Main Keyboard) |
| 55 Alt Asterisk ("*") (Keypad) |
| 74 Alt Minus ("-") (Keypad) |
| 76 Center Keypad key (5) with NumLock off |
| 78 Alt Plus ("+") (Keypad) |
| |
+-----------------------------------------------------------+
Figure 2



 December 17, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)