Archived

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

Lalle

VK_B?

Recommended Posts

If I want to test if the space key is beeing pressed, I use the GetAsyncKeyState() function like this: if (GetAsyncKeyState((int) VK_SPACE)) //do something what do I have to change VK_SPACE to if I want to check if a letter is held down? ie. GetAsyncKeyState(VK_B) //this wont work thanks Lalle

Share this post


Link to post
Share on other sites
You use the value of a the uppercase character
eg
GetAsyncKeyState(''A'') // VK_A
GetAsyncKeyState(''B'') // VK_B
GetAsyncKeyState(''C'') // VK_C
...

with number keys its the same
GetAsyncKeyState(''1'') // VK_1
GetAsyncKeyState(''2'') // VK_2
GetAsyncKeyState(''3'') // VK_3
...

but its different with the num pad keys - I don''t remember
VK_NUM1 i think

Share this post


Link to post
Share on other sites