C++ check if button pressed
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
}
}
}
