Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fernwood!portal!cup.portal.com!ekalenda From: ekalenda@cup.portal.com (Edward John Kalenda) Newsgroups: comp.os.msdos.programmer Subject: Re: Can a software detect two keys at the same time? Message-ID: <43777@cup.portal.com> Date: 28 Jun 91 19:19:21 GMT References: <1991Jun27.204556.5207@msuinfo.cl.msu.edu> Organization: The Portal System (TM) Lines: 15 >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