In c++ how do i check if a key is pressed ( not GetAsyncKeyState/GetKeyState because when I hold it down it spams the command)
Code:int main() { while (1) { if (GetAsyncKeyState(VK_INSERT)) { //Command } } }
Last edited by lolman40; 06-18-2017 at 06:45 AM.
Last edited by affe2626; 06-18-2017 at 11:53 AM. Reason: [CODE] tags
Always PM me when trading, I've been hacked on my Skype previously
[img]https://**********.com/addskype/affe2626.png[/img]
dude that is simple code
Code:int main() { bool pressed = false; while (1) { if (GetAsyncKeyState(VK_INSERT) && !pressed) { pressed = true; //Command } else { pressed = false; } } }