Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!ucdavis!deneb.ucdavis.edu!u366609662ea From: u366609662ea@deneb.ucdavis.edu (0040;0000009381;0;210;141;) Newsgroups: comp.sys.ibm.pc Subject: Re: Software to swap ctrl and capslock on *enhanced* keybd? Message-ID: <3207@ucdavis.ucdavis.edu> Date: 26 Oct 88 09:20:31 GMT Article-I.D.: ucdavis.3207 References: <10200@cup.portal.com> Sender: uucp@ucdavis.ucdavis.edu Reply-To: u366609662ea@deneb.ucdavis.edu.UUCP (PUT YOUR NAME HERE) Organization: University of California, Davis Lines: 39 In article <10200@cup.portal.com> jxh@cup.portal.com (Jim - Hickstein) writes: >Is there software out there somewhere that will effectively swap the >functions of the caps-lock and ctrl keys on my "enhanced" 101-key >keyboard? This should be possible if one can usurp the INT 08H vector >in software. ... >The physical location of the function keys is harder to >change (especially in software :-) but they don't bother me as much as the >bizarre location for (left-)control. > >P.S. I already have a program that turns OFF numlock at boot time. I started writing such a program. However, I never finsihed it. Ex code: main() { char far * p; p = (char far *) 0x417; *p = 0; } I would say more but I don't have the actual code on hand. (I believe that is right) What this does is turn off the numlock, capslock, shift etc... But, you can all ready do that, but its the foundation to the solution. You can remap any key to whatever value (scancode) you want, but you are going to have to hack up the keyboard handler. Actually you won't have to touch the actual handler, just move it to a different location in memory, place your own "key-substitution" procedure in it's place. When your procedure is done call the actuall keyboard handler. The bytes following hex 417 are what you want to look at. The first byte tells you about right shift,left shift, ctrl shift, altshift, scroll lock, num lock, caps lock, and insert. (bit 0,1,2,3,4,5,6,7) And the second byte tells you if the keys are depressed. Patrick Tully pstully@ucdavis