Archived

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

How to use non-special keys in Latest BaseCode?

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