Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!pathak From: pathak@s.cs.uiuc.edu Newsgroups: comp.sys.ibm.pc Subject: Re: Keyboard Scan Codes Message-ID: <213400043@s.cs.uiuc.edu> Date: 21 Apr 89 15:56:00 GMT References: <44953@<89103> Lines: 44 Nf-ID: #R:<89103:44953:s.cs.uiuc.edu:213400043:000:768 Nf-From: s.cs.uiuc.edu!pathak Apr 21 10:56:00 1989 You may not have to write your own int9 routine. If all you want is the status of the shift keys, control keys, alt keys .... then you can use a BIOS function to do the same. int 16h func 02h call with: AH = 02h Returns in AL: Bit Significance if set 7 Insert on 6 Caps lock on 5 Num lock on 4 Scroll Lock on 3 Alt key down 2 Ctrl key down 1 left Shift down 0 right Shift down The enhanced keyboard that came with the AT and PS/2 can be read using: int 16h func 12h call with AH = 12h Returns in AL: Bit Significiance F SysReq down E Caps Lock down D Num Lock down C Scroll Lock down B right Alt A right Ctrl 9 left Alt 8 left Ctrl and the rest is the same as before Heeren Pathak s.cs.uiuc.edu