Date: Sun, 19 Apr 1998 14:25:05 +0300 (IDT) From: Eli Zaretskii To: QBallLives cc: djgpp AT delorie DOT com Subject: Re: Keybord Read Problem In-Reply-To: <1998041709091600.FAA04289@ladder03.news.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 17 Apr 1998, QBallLives 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. > > It could be the buffered input thing... > > try putting this: > > setbuf(stdout,NULL); /* fix djgpp's buffered output */ Buffering has no effect on reading keys through BIOS. BIOS reads are always unbuffered.