🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9250

Checking status of certain keys

#9250
From: glennl
Date: Thu, 30 Jun 1988 19:33
22 lines
1295 bytes
[]

	I'm working on a simple game on the Amiga in my spare time, and need
to know how to check whether certain keys are down or up.

	I could do this one of two ways:  Either receive one and only one
KEYDOWN message, and one KEYUP message, or Not accept messages at all, but
check the key directly each time within a loop.

	I would prefer the former method, but when I use:
while (message = GetMsg(..)) { ... }
	and hold down a key, the timing within the WaitTOF() loop gets all
messed up, and nothing appears on the screen until I let go of the key.
So how to I check the status of a few keys, without messing up my animation
loop?

	Thanks for your help.  Please reply via e-mail, since this is
probably not terribly useful for everybody else.

							-- Glenn Lewis

glennl@vlsi.caltech.edu
Technical Details
Message-ID: <7122@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!gatech!ncar!ames!elroy!cit-vax!cit-vlsi!glennl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!gatech!ncar!ames!elroy!cit-vax!cit-vlsi!glennl
From: glennl@cit-vlsi.UUCP
Newsgroups: comp.sys.amiga.tech
Subject: Checking status of certain keys
Message-ID: <7122@cit-vax.Caltech.Edu>
Date: 30 Jun 88 19:33:00 GMT
Sender: news@cit-vax.Caltech.Edu
Reply-To: glennl@cit-vlsi.UUCP (Glenn M. Lewis)
Distribution: na
Organization: California Institute of Technology
Lines: 22