delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/14/17:31:39

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: mikeh106 AT hotmail DOT com (Mike H)
Newsgroups: comp.os.msdos.djgpp
Subject: Handling multiple keys in video game
Date: 14 Feb 2004 14:19:15 -0800
Organization: http://groups.google.com
Lines: 13
Message-ID: <f9c129dc.0402141419.5a3dc3e@posting.google.com>
NNTP-Posting-Host: 172.168.160.135
X-Trace: posting.google.com 1076797156 1010 127.0.0.1 (14 Feb 2004 22:19:16 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Sat, 14 Feb 2004 22:19:16 +0000 (UTC)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

How do I tell which keys are being held down (W, A, S, and D for
example) either alone or simultaneously? If I try to use inportb(0x60)
and press A, then S, then release A, I get something like

30

31

158 for a split second
31.

This is bad if the game doesn't recognize that split second. What
technique do you use?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019