leeda@frith.egr.msu.edu (Dae Hee Lee) (06/28/91)
Is there any way to make a program detect two keys pressed at the same time? For example, if I press a and b at the same time, can a program detect both? Thank you for your help in advance! Daehee Lee
ekalenda@cup.portal.com (Edward John Kalenda) (06/29/91)
>Is there any way to make a program detect two keys pressed at the same time? >For example, if I press a and b at the same time, can a program detect both? >Thank you for your help in advance! > >Daehee Lee If you take over the haardware interrupt for the keyboard controller you can detect the press and release of keys. The controller returns scancode numbers in the range of 1 to 127 for the press off a key and 129 to 255 for the release. The normal interrupt handler uses a table to convert these codes to ASCII and extended-ASCII codes that are returned by int10h calls. Ed ekalenda@cup.portal.com
ekalenda@cup.portal.com (Edward John Kalenda) (06/29/91)
Soory, I made a mistake in my previous reply. The keyboard codes are returned by int16h, not int10h. Soory. Ed ekalenda@cup.portal.com