Jump to content
  • Advertisement


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



This topic is 5275 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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!