From: jih-shin ho Subject: Re: how to tell which key is down To: hegt AT iaci DOT kun DOT nl Date: Tue, 6 Jul 93 9:35:28 EAT Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp) > > > Hello all, > > I would like to know how I can tell which key is currently pressed. I > know I can use getkey() to see which key has been pressed, but that is > not good enough. > > Can I re-program the keyboard controller in such a way that I can simply > read some port, or is there another approach? > > Example code would be nice ... > > > Thanks, > Rob Hegt > You should write an interrupt subroutine for INT 9. When a key is pressed, the keyboard will send the scan code x. If it is depressed, the keyboard will send 0x80+x.