Mail Archives: djgpp/1998/04/07/04:26:35
On Mon, 6 Apr 1998, Steven S. Falls wrote:
> unsigned userinput;
> if(kbhit()) userinput=getkey() //or getch()
>
> but the problem is that it does not get the first key you press. You
> often get a delay or you have to press the key twice.
This must be due to some bug in your code. As written, the above
snippet should not miss any keypresses.
Perhaps if you post a short program which can be compiled and run by
other people, and describe the sequence of events whereby it loses
keys, others could help you find and correct the problem(s).
- Raw text -