delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/26/07:34:00

Date: Fri, 26 Jul 1996 14:26:37 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Deren Ercoskun <bluestar AT dominet2 DOT in DOT com DOT tr>
Cc: djgpp <djgpp AT delorie DOT com>
Subject: Re: C question
In-Reply-To: <Pine.LNX.3.91.960726134042.10861F-100000@dominet2.in.com.tr>
Message-Id: <Pine.SUN.3.91.960726142311.19397O-100000@is>
Mime-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019