Yea, that's right I forgot to change the bool on/off. GetAsyncKeyState returns the state of the key as a signed short, whether it's up or down. Low bit is positive and is set when the key is up, which the &0x0001 checks for. High bit is negative and is set when the key is down, to check for it you would &0x8000 with the result. If you weren't to do any AND operations, it would just check if a value was returned or not, if the key was up or down.
Bookmarks