🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1595

Re: Reading multiple keypresses at once

#1595
From: Tom Almy
Date: Wed, 18 Jul 1990 15:20
31 lines
1867 bytes
In article <204@sc2a.unige.ch> fisher@sc2a.unige.ch (Markus Fischer) writes:
>In article <11396@hydra.gatech.EDU>, ccastje@prism.gatech.EDU (John Adair) writes:
>> How do programs read multiple keys pressed at the same time (not just
>> Alt and 'X')?  [...]
>> Along the same lines, how do I discard the keypresses before (or as soon
>> as) they reach the buffer, preferably without having to constantly 
>> read in and discard characters?
>
>For what it's worth:  In the interrupt list (some outdated version, you can
>find the latest at SIMTEL20 PD1:<MSDOS.INFO>INTER###.ZIP) I find:
>
>INT 15 - OS HOOK - KEYBOARD INTERCEPT (AT model 3x9,Xt2,XT286,CONV,PS)
[...]
>In an older posting, Tom Almy (at the time <toam@tekgvs.labs.tek.com>) used
>this interrupt to remap the AT keyboard's CapsLock to another Ctrl key.  It
>works beautifully.

Well, since my name was mentioned, see my "signiture" for correct address.

I also used this interrupt hook for a Smalltalk implementation where I had
to capture key presses and releases, and the hook stuffed them in a queue.

In this application (and in the original thread authors) the typamatic action
had to be eliminated as well. I maintained a bit array of depressed keys,
and would completely toss a "make" code if the key was listed as depressed.

Lots of fun to code, and worked like a charm.

Tom Almy
toma@tekgvs.labs.tek.com
Standard Disclaimers Apply
Technical Details
Message-ID: <7826@tekgvs.LABS.TEK.COM>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma
References: <11396@hydra.gatech.EDU> <204@sc2a.unige.ch>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma
From: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Newsgroups: comp.os.msdos.programmer
Subject: Re: Reading multiple keypresses at once
Message-ID: <7826@tekgvs.LABS.TEK.COM>
Date: 18 Jul 90 15:20:31 GMT
References: <11396@hydra.gatech.EDU> <204@sc2a.unige.ch>
Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy)
Organization: Tektronix, Inc., Beaverton,  OR.
Lines: 31