Mail Archives: djgpp/1993/07/05/22:09:40
>
>
> 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.
- Raw text -