Virtual Key Codes in video game seems all scrambled up. Why?

In the game I play, SendInput with the key code 0x20 is used to press your A key to move your character left. 0x1E is used to press your D key to move your character right. Why do the virtual keys for Spacebar (0x20) and IME Accept (0x1E) (I don't know what that even is) work for A and D and not Spacebar and IME Accept? Also, how do I get the virtual keys of other buttons on my keyboard for the game I play since they appear to be mixed up?


I found out that the problem is, when using DirectX applications such as video games, the virtual keys are different. Here is the list of them:
Last edited on
Help please ):
Did you have a C++ question?

If not, you may want to ask in a forum for which the game you play is topical.
You shouldn't know the values. Use the facilities of the library to compare the keys (maybe they are macros)
As to why several keys correspond to the same value, you are probably reading wrong (using the wrong function). By instance, especial keys in ncurses are outside the 8-bit range
Topic archived. No new replies allowed.