Here is the code Im using right now
The problem if that if I press and hold down a key it kind of gets pressed, then waits for a second, and then is continually pressed... I dont know how to explain it better does anyone know what Im talking about?Code:if (GetAsyncKeyState(VK_UP) & SHRT_MAX) gUpKey = true; else gUpKey = false; if (GetAsyncKeyState(VK_LEFT) & SHRT_MAX) gLeftKey = true; else gLeftKey = false; if (GetAsyncKeyState(VK_DOWN) & SHRT_MAX) gDownKey = true; else gDownKey = false; if (GetAsyncKeyState(VK_RIGHT)& SHRT_MAX) gRightKey = true; else gRightKey = false;
Example: in notepad press and hold a key and you will see what Im talking about. How can I fix this problem?