Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!sharkey!wyn386!wybbs!sleepy From: sleepy@wybbs.mi.org (Mike Faber) Newsgroups: comp.lang.c Subject: Re: Re^2: How to test if a key has been hit w/o waiting for a key ? Summary: Whoa!! Message-ID: <172@wybbs.mi.org> Date: 4 May 90 14:01:56 GMT References: <3544@castle.ed.ac.uk> <182@demott.COM> <547@oglvee.UUCP> Organization: Consultants Connection, Jenison MI Lines: 7 I missed parts of this, but couldn't you use ioctl? Set yourself up as nonicanonical processing, and in the array struct.c_cc, set the VMIN element (struct.c_cc[VMIN]) to 0 and VTIME element to 1. Then a getchar() or getc() will return -1 if no characters were received. If you want to put it back, ungetc(or something like that) is supposed to work...