Virtual Keycodes

Started by
4 comments, last by Nazmir 23 years ago
IS there a reason why my compiler would recognize VK_F2, VK_F3, VK_END, etc., but not VK_A through VK_Z. I can''t figure out why it''ll recognize some keycodes but not other. Can someone shed some light on this for me. Nazmir
Advertisement
I can''t really tell you WHY they don''t work, but I am pretty sure that if you just replace VK_A with ''A'' it will work the same way. That''s what I did in my game.

~Blue_Limbo
~Blue_Limbo
Ok, how would I distinguish between captial and lowercase letters if i did it that way? I mean I was trying to do it with the virtual codes for mulitple keypresses, because I'm following what Nehe does. So is there another way to check for mulitple kepresses doing what you said.

Edited by - Nazmir on April 25, 2001 1:11:34 AM
Sorry to tell you but your keyboard does not have a capital ''A'' and a small ''a''
So there is only one virtual key code for the letters
If you need to distigush you first find out the state of the various shift keys.

Just because the church was wrong doesn''t mean Galileo wasn''t a heretic.
It just means he was a heretic who was right.
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
if VK_SHIFT && ''A''
or like
if VK_SPACE && VK_LEFT

that should work...
If you''ll have a look at the Virtual Key codes you''ll see that there aren''t defines for letters, but you can use the ascii value (As you said: just use ''A'', not lowercase).



- Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction

This topic is closed to new replies.

Advertisement