🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
1 messages
1 total messages Started by John Adair Fri, 13 Jul 1990 05:48
Reading multiple keypresses at the same time
#1610
Author: John Adair
Date: Fri, 13 Jul 1990 05:48
17 lines
1393 bytes
How do programs read multiple keys pressed at the same time (not just
Alt and 'X')?  Many multiple player games allow two players to share
the keyboard.  Is there a way to get the 8042 to alternate scan codes
between the two keys (i doubt it)?  Do I have to sit there and poll
the keyboard port (0x60, I think), remembering that the first key has
sent a 'make', but not a 'break', before the second key sends a 'make'?
Is there a simpler way to do this?

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?

John Adair   :  ccastje%prism@gatech.edu : ccastje%prism.gatech.edu.BITNET
uucp:         ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!ccastje
Georgia Tech Box 30812, Atlanta, GA 30332                      Disclaimer:
I speak only for myself, and in no way, shape or form reflect the views or
opinions of my employer  (The Office of Computing Services, Georgia Tech).
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads