Advertisement Jump to content


This topic is now archived and is closed to further replies.



This topic is 5369 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i usual use GetAsyncKeyState(VK_UP) and the other virtual key codes when i want to use the arrow keys or check to see if the escape button has been pressed. but for my new game i want to check if the letters z, x, p, n, or q have been pressed. i have found VK_LIST but can't find what i would put in the GetAsyncKeyState function to check whether or not a letter has been pressed. does anybody know the key code i need and syntax to use to complete this task? thanks. [edited by - drewsmug on May 9, 2004 3:59:23 PM]

Share this post

Link to post
Share on other sites
This goes like this. For example

To check ''a'' letter you can put:

if (GetAsyncKeyState(''A'') & 0x8000f)
// Do something


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!