Mail Archives: djgpp/1996/07/26/07:34:00
On Fri, 26 Jul 1996, Deren Ercoskun wrote:
> How can I check the keyboard buffer to see if there is someething waiting
> and if its an direction key how can I dertermine which one is it ??
> I use kbhit and getch but after getch I only get 0 ??
If `getch' returns 0, call it again and you will get the scancode of the
key. Keys that don't have ASCI code always return a 0 on the first call
to getch and the scancode on the next.
Or you can use the `getkey' or `getxkey' functions that return the key in
one call, even if it is a special key.
- Raw text -