From owner-freebsd-hackers Tue Jun 24 23:52:08 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id XAA05430 for hackers-outgoing; Tue, 24 Jun 1997 23:52:08 -0700 (PDT) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id XAA05412 for ; Tue, 24 Jun 1997 23:52:03 -0700 (PDT) Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id IAA00751; Wed, 25 Jun 1997 08:52:01 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.8.5/8.8.5) id IAA06941; Wed, 25 Jun 1997 08:50:08 +0200 (MET DST) Message-ID: <19970625085007.ZX52176@uriah.heep.sax.de> Date: Wed, 25 Jun 1997 08:50:07 +0200 From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-hackers@FreeBSD.ORG ('freebsd-hackers@freebsd.org') Cc: MSAYER@cuscal.com.au (MARK SAYER) Subject: Re: BSD io References: <199706250208.TAA23288@hub.freebsd.org> X-Mailer: Mutt 0.60_p2-3,5,8-9 Mime-Version: 1.0 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199706250208.TAA23288@hub.freebsd.org>; from MARK SAYER on Jun 25, 1997 12:07:47 +1000 Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk As MARK SAYER wrote: > I have been looking for this for ages. I resorted to using ncurses, but > then I was stuck with using ncurses window management (yuk). So, I tried > the code below and it doesn't seem to work as promised. I just want the > program to trap 1 keypress and continue execution. Who promised this program to work? > new.c_iflag &=~(ICANON|ECHO); new.c_lflag &= ~(ICANON | ECHO | IEXTEN); /* consider ISIG etc., too */ ...and it works. Also, you should probably do: new.c_cc[VMIN] = 1; new.c_cc[VTIME] = 0; to specify your wishes explicitly. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)