This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Developer question on key codes in GAPI


Developer question on key codes in GAPI

Postby Frank W. Zammetti » May 21, 2001 @ 3:42pm

Hi guys, I thought this might be a good place to ask this...<br><br>After looking through the PocketQuake source and not having any luck find my own answer, my question is this...<br><br>How do you recognize a diagonal button press?  I'm using an E-125, and I know this may be a problem on an iPaq, but one thing at a time... <br><br>It seems like you get the vKey codes for the two directions constituting the keypress in WM_KEYDOWN messages in quick succession and I haven't figured out if there is another way to recognize it or how to process that properly.<br><br>Any help you could throw my way would be much appreciated.  Thanks all!
Frank W. Zammetti
 


Re: Developer question on key codes in GAPI

Postby Dan East » May 21, 2001 @ 3:47pm

If you are handling keypresses via messages, as PQ does, then you would receive two sequential key down messages for the two directions that are being pressed together. Your app has to keep track of the up down state of each button, and behave accordingly when two have the down state at the same time.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Developer question on key codes in GAPI

Postby Dan East » May 21, 2001 @ 4:39pm

You can also poll for key states using the GetKeyState function, instead of waiting for messages to come your way. If you are only using a small number of controls (as opposed to handling full keyboard input, like PQ), then that may be the better option.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: Developer question on key codes in GAPI

Postby SonicSilicon » May 21, 2001 @ 6:18pm

Seperate codes for diagonal directions. . . sounds like how an Atari handles it, except it generated a specific number for each direction including centered.<br><br>I can't - beleive - I - just - wrote that.
User avatar
SonicSilicon
pm Member
 
Posts: 204
Joined: Mar 7, 2001 @ 1:36pm


Re: Developer question on key codes in GAPI

Postby Frank W. Zammetti » May 21, 2001 @ 7:21pm

Ah yes, and now I feel totally silly for not figuring that out on my own!<br><br>I do appreciate the help though.  I also didn't rezlize there was a general development forum (I linked to this board from another site, didn't really look around first), I would have posted there had I seen it.<br><br>Thanks again very much! (Unfortunately, now that I know how quick and helpful you guys are, I may bug you more...)
Frank W. Zammetti
 


Return to Pocket Quake 1 and 2


Sort


Forum Description

Discuss Pocket Quake 1 and 2 by Dan East

Moderators:

Dan East, sponge, James S

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum