Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: NOVICE question: How to know when a key is pressed Keywords: key, keypress, c, novice Message-ID: <1838@bbxsda.UUCP> Date: 11 Apr 91 21:22:33 GMT References: <1991Apr11.155200.12819@ericsson.se> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 18 In article <1991Apr11.155200.12819@ericsson.se> etxpihl@tore.ericsson.se (DEE Tomas Pihl) writes: >I want to know how you can scan if a specific key has been pressed. >Just as this program I'm using know know that i press eg. ESC. >I don't want the pressed key to be echoed out to the screen as it is >with getchar(). What you want is to be able to read individual key strokes without echo. There is no standard way to do it. On unix/xenix systems check the ioctl() calls in your manual. On MSDOS you can perform raw console I/O (again, check the manual). Another newsgroup can probably provide a better answer. -- Scott Amspoker | Touch the peripheral convex of every Basis International, Albuquerque, NM | kind, then various kinds of blaming (505) 345-5232 | sound can be sent forth. unmvax.cs.unm.edu!bbx!bbxsda!scott | - Instructions for a little box that | blurts out obscenities.