How to pause and unpause my console on the desired key

I want to pause my program on the 0x32, 0x33 and 0x34 key and make it work again on the 0x31 key, how can I? I used this code to pause on the 0x32 key, it's working, but I can't get it back to work on the desired key

if (GetAsyncKeyState(0x32))
{
getchar();
}
you can't stop the program AND also have it respond to input.

however you can stop other things...
set a bool true if you are wanting to pause.
set it false if you want to resume.
whatever it is that should be paused goes in an if statement using that bool.
Topic archived. No new replies allowed.