Jump to content
  • Advertisement
Sign in to follow this  
kelvindavies11

keyboard numbers

This topic is 4405 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

im doing a case that controls the input from the keywboard and i need to find out the number that is associated with the up, down, left and right arrows. anyone know them, kelvin

Share this post


Link to post
Share on other sites
Advertisement
The key codes aren't necessarily fixed. What API are you using to get your keyboard input? If you're using Win32 messages then there are a set of VK_* constants defined for you. If you're using SDL for input, then you can use the SDLK_* constants. If you're using DirectX Input, you have the DIK_* constants.

Share this post


Link to post
Share on other sites
If you are using win32, look in winuser.h

I think you'll find that the virtual key defines for the arrows are simply VK_LEFT, VK_RIGHT, VK_UP and VK_DOWN. I think.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!