   array of 256 keys?
  Does anyone here use the technique like Nehe does, where you keep an array of 256 boolean values representing whether the keys are down? I tried doing it but I ran into a problem.I use f as my forward key, so I have a test like this in my update function : const char FORWARD = ''f'';...if (keys[FORWARD])   //move forwardBut it didnt work. Apparently its because keys[''f''] looks in keys[70], however actually pressing f sets keys[102]. Where the heck did 102 come from? How can I reliably set my movement keys without having to run the program and test which value actually gets set when I press it? 
  70 is an upper-case ''F'', and 102 is a lower-case ''f'' ;  Hmm no I didnt think i was dumb enough to have had the caps lock on without noticing. No matter what version of ''f'' I push (caps or no), it still gives code 102. Should I just assume that all letters have to be caps? this is kind of dumb. What if for some reason you wanted lower case letters input into a program? ;  How are you obtaining the key value (eg: 102) - which API functions are you taking? ;  Well, not sure why it''s not working for you. If you''re checking in keys[''f''], then it should be looking in keys[102] which should work.If you want the program to distinguish between upper and lower case letters, then you might have to check the Shift and Caps Lock keys yourself. I think I remember having to do that once. ;  In the WindowsProcedure function, underCase WM_KEYDOWN:I have this code:keys[wParam] = TRUE;Using the debugger, I can see that pressing either f or F both results in keys[102] being set.  ;quote:Original post by pinacolada  Well, not sure why it''s not working for you. If you''re checking in keys[''f''], then it should be looking in keys[102] which should work.If you want the program to distinguish between upper and lower case letters, then you might have to check the Shift and Caps Lock keys yourself. I think I remember having to do that once.   OOOOOOOOOh. I didn''t know that. Ok thanks!Although, you would think that it would be the other way around; lower case by default, and you need to check for shift or Caps to make them upper case.Oh well. ;  windows.... pffffff...they have VK_LEFT, VK_RIGHT, ect... for keycode entries, but no VK_F, VK_U, VK_C, VK_K, which would clear the confusion.  ;  Well, VK_A ... VK_Z are not needed since they are simply the ascii values (of the uppercase letters). That''s also stated in the MSDN somewhere. ;  my point. confusions between ''f'' and ''F''.  