Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState.
if ((GetAsyncKeyState(VK_F1) & 1) != 0)
. It means: the key has been pressed at least once since the previous call to GetAsyncKeyState. On the one hand, this bit is not recommended (it works when there are no other programs calling GetAsyncKeyState). On the other hand, the least significant bit of GetAsyncKeyState () in the modern implementation of Windows works exactly as it should (if the program is inactive, GAKS returns 0.) Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question