Jump to content
  • Advertisement

Archived

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

Cibressus

How to use non-special keys in Latest BaseCode?

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

can some one post a example of a regular keyboard carcter (abcdefghijlmnopqrstuvwxy and or z) being used with the keys function in the lastest base code? i can only get special keys working (VK_F1, VK_UP, ect.)

Share this post


Link to post
Share on other sites
Advertisement
You usually just enclose the character you want to use with a single quote so you get the character code, for example...

if(key['A']) //65
//...


[edited by - JohnyB on March 28, 2004 2:55:25 AM]

Share this post


Link to post
Share on other sites
well, here

this code DOES work

if(g_keys->keyDown[VK_UP] == TRUE)
{
Camera.MoveCamera(0.02f);
}

this code DOES NOT work

if(g_keys->keyDown[''w''] == TRUE)
{
Camera.MoveCamera(0.02f);
}

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the letter needs to capatalized. if the letter is a capital it should work

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!