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.
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.
i know how to do this using some windows.h functions, but i don't think that's what you want...
If you're using "true DOS" you can replace the current keyboard handler with your own using interupts. Check out this file: