Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: WANTED: do while no key pressed (in portable code) Message-ID: <16535@mimsy.UUCP> Date: 26 Mar 89 04:47:49 GMT References: <22064@agate.BERKELEY.EDU> Distribution: usa Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 23 In article <22064@agate.BERKELEY.EDU> air@anableps.berkeley.edu writes: >title says it all. Titles get truncated, so here it is again: >WANTED: do while no key pressed (in portable code) Step 1: define, portably, `key pressed'. I can think of a number of different definitions: - there is input available (has nothing to do with `keys' pe se) - terminal input is available, character-at-a-time - a non-modifier (not SHIFT, etc.) key on a computer keyboard is in the `down' position - any key (including SHIFT) is in the down position The only one that can even make a pretense at portability is the first, and on a closer look, one discovers that there is no portable way to do that either. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris