hgm@beta.UUCP (Harry McGavran) (05/11/87)
If one wants to take advantage of the KB5151 alternate keypad one has to implement the shift function in conjuction with the numlock function. This seems to have been left out of tty.c I also noticed there is a typo or two in the lookup tables for the keyboard. These need to be fixed for the KB5151 alternate keypad to do its best. The following line numbers are those used in the book. Change line 3460 from ,0261, 0262,0263,0,0177 to ,0261, 0262,0263,0260,0177 Change line 3470 from '2','3','0',177 to '2','3','0','.' By the way, the '177' that was in line 3470 was probably meant to have been '0177' and was probably a typo in the distribution as well as the book. Change line 3717 from if (c > 70 && numlock) code = sh[c]; /* numlock depressed */ to /* implement numlock and shift-numlock */ if (c > 70 && numlock) code = (shift1 || shift2 ? unsh[c] : sh[c]); As I usually do, I make no claim for the suitability of these changes for anything. Hopefully your KB5151 or similar keyboard will be more useful though. Harry McGavran hgm@LANL.GOV Los Alamos National Laboratory MS-B294, Group C-8 Los Alamos, New Mexico 87545 505/667-4050
hgm@beta.UUCP (05/11/87)
Speaking of typos, in my original posting I wrote: >Change line 3717 from > ^^^^ > if (c > 70 && numlock) code = sh[c]; /* numlock depressed */ > >to > > /* implement numlock and shift-numlock */ > if (c > 70 && numlock) code = (shift1 || shift2 ? unsh[c] : sh[c]); The line number should be 3712, NOT 3717! When editing these changes in, you were likely to catch this, but just to make sure I am posting this. Harry McGavran hgm@LANL.GOV Los Alamos National Laboratory MS-B294, Group C-8 Los Alamos, New Mexico 87545 505/667-4050