cplusplus.com
C++ : Forum : Windows Programming : Check if a key is down
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


questionsolved Check if a key is down

garob (72)
I am making a game and I need to know if an up key or down key is down and move the player accordingly. I found GetAsyncKeyState and GetKeyState on google but I can't figure out how they work and what I should use.
Can someone explain how to tell if a key is down please.
Thanks
Bazzy (6258)
Try ReadConsoleInput, here you can find an example: http://msdn.microsoft.com/en-us/library/ms685035%28VS.85%29.aspx
garob (72)
I found something explaining my problem at http://www.gamedev.net/community/forums/topic.asp?topic_id=338405
Last edited on
Topic archived. No new replies allowed.