changing keyboard codes going into the UNIX PC
David Solan
Kdavid at gizzmo.UUCP
Tue Apr 11 11:14:44 AEST 1989
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Some time ago, Mike Ditto posted the source for a dynamic keyboard
remapper for the UNIX PC (called "keyfix"), which changed the copy of
/unix in core as the system was up and running. Its usage was:
keyfix <keynum> [ <norm> <shift> <ctrl> <flags> ]. Since these
changes to the keyboard are usually permanent, I thought I'd do it the
dirtier (and much faster) way of making permanent changes to /unix
itself. The following uses adb and of course, a LARGE NOTE OF
CAUTION: BACK UP YOUR /unix AND IF YOU MAKE ANY ERRORS, THEY COULD BE
DISASTROUS TO YOUR SYSTEM!!!!!!
So, if you wanted to execute the command:
keyfix 0x25 0x7f 0xff 0xff 0
to change the Reset/Break key (0x25 in /usr/include/sys/kbd.h) to
issue the break command when depressed without shift or ctrl, and be
non-repeatable, you could instead do:
adb -w /unix
keymap+(8*25)?4x
?w 0x007f 0x00ff 0x00ff 0x0000
$q
and you would get (in UNIX 3.51) the following confirming output:
keymap+128: ff ff ff 0
swpulse+21a2: ff = 7f
swpulse+21a4: ff = ff
swpulse+21a6: ff = ff
swpulse+21a8: 0 = 0
The corresponding address for the Del/Esc key is: keymap+(8*1b)
The corresponding address for the space key is: keymap+(8*20)
The corresponding address for the _/- key is: keymap+(8*2d)
The corresponding address for the ?// key is: keymap+(8*2f)
The corresponding address for the ^/6 key is: keymap+(8*36)
... and so on.
I tried it out and it worked fine.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
David Solan
Objective Programming Incorporated
Post Office Box 123
Norwalk, CT 06856
Voice: (203) 866-6900
attmail: <!dsolan> or <attmail!objctv!kdavid>
--
24 million Americans will die in the next 10 years without their seat belts on.
Buckle up now! {codas,u1100a}-----\
David Solan rutgers!rochester!kodak!pcid!gizzmo!kdavid
{lazlo,ethos,fthood}-----/
More information about the Unix-pc.general
mailing list