I've been having a problem with one of my programs where I want to move a cursor everytime a key is pressed. It looks like this.
do{
if (kbhit())
MovePaddle();
}while(1);
The problem is that if you hold down a key it (kbhit) doesn't return true constantly, so the paddle just moves one little pixel at a time. I want to make it so that it moves everytime it loops around, and then I can control it with a time condition. Does anyone know of a unction that I can use to return true constantly while a key is pressed and ale only when it is released? kbhit just returns true as fast as the keyboards repeat rate.