Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ptsfa!ihnp4!cuae2!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP Newsgroups: comp.lang.c Subject: Re: boolean function to tell if a key has been pressed Message-ID: <1626@ttrdc.UUCP> Date: Sun, 22-Mar-87 01:49:19 EST Article-I.D.: ttrdc.1626 Posted: Sun Mar 22 01:49:19 1987 Date-Received: Mon, 23-Mar-87 01:46:33 EST References: <10260@topaz.RUTGERS.EDU> Organization: AT&T, Skokie, IL Lines: 24 Summary: tell us your machine and compiler please In article <10260@topaz.RUTGERS.EDU>, whoffman@topaz.RUTGERS.EDU (The Skiing Fanatic!) writes: < I am seeking a way to tell whether or not a key has been pressed on < a keyboard. i.e something like this: < < while (1) < { ...statements.... < if "a key has been pressed" {...statements} < ...statements...} < < the problem i keep running into is that getc,getchar etc..all WAIT for < a key to be pressed. I would just like to see IF one has been pressed. < Any help on this would be greatly appreciated. Thanks in advance... < William R. Hoffman Please tell us your machine and compiler when making net requests like this. The answer differs depending on whether the environment is a PC (and upon the PC compiler), System V, Berserkely Unix, VMS, IBM/CMS, etc. Stuff having to do with single key strokes is system dependent and may require special terminal setups and/or exotic I/O calls and/or etc. -- |------------dan levy------------| Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, | an engihacker @ | vax135}!ttrdc!ttrda!levy | at&t computer systems division | Disclaimer: these views are all MINE! |--------skokie, illinois--------| MINE! MINE! HAHAHAHAHAHAHAHAHA!!!!!!