Skip to main content
GameDev.net gamedev.net
🔒 Locked

GetAsyncKeyState() vs. DirectInput

Started by Gilzu Jan 8, 2003 at 4:27 PM 4 replies 700+ views
Original Post
Gilzu
Gilzu
i''m currently using GetAsyncKeyState(), but i''m havin trouble with getting the states of 3 keys-down together (up+left+space for example), it only returns me the first two anyway, i wanted to ask before ill waste my time porting to DirectInput, if there''s a way to read more than 2 key states at once. if not using GetAsyncKeyState(), does anybody has experience reading more then 2 keys at once with DirectInput? 10x, Gil
Gil Zussman gil@gilzu.com http://www.gilzu.com
[email=gil@gilzu.com]Gil Zussman[/email]Check out Goose Chase, Coming this fall!http://www.gilzu.com
MichaelT
MichaelT
Try look for the subject in Google.

____________________________________________________________
Treat others the way you want them to treat you!!

[edited by - MichaelT on January 10, 2003 5:23:06 PM]
No no no no! :)
Baltzar
Baltzar
You can trace the keyboard by chacking Key status.
Test the return values of "GetKeyState" if the high-order bit is 1, the key is down; otherwise, it is up.
Remeber what is pressed and what is released. Then user can press all the keyboard and yet not miss anything.

regards,
Baltzar.



[edited by - Baltzar on January 8, 2003 11:01:30 PM]
Krisc
Krisc
ya, like

(VB)

If GetAsyncKeyState(VK_SPACE) <> 0 Then
''Key is pressed...
EndIf

<- Digital Explosions ->
"Discipline is my sword, faith is my shield
do not dive into uncertainty, and you may live to reap the rewards" - (Unreal Championship)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.