From owner-freebsd-questions@FreeBSD.ORG Sat Sep 15 08:12:14 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2239916A417 for ; Sat, 15 Sep 2007 08:12:14 +0000 (UTC) (envelope-from lars@larseighner.com) Received: from mail.team1internet.com (mail.team1internet.com [216.110.13.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0098A13C459 for ; Sat, 15 Sep 2007 08:12:13 +0000 (UTC) (envelope-from lars@larseighner.com) Received: by mail.team1internet.com (Postfix, from userid 12346) id 5BEF516B53D; Sat, 15 Sep 2007 03:12:13 -0500 (CDT) Received: from larseighner.com (unknown [216.110.13.86]) by mail.team1internet.com (Postfix) with SMTP id D8C9516B4EE for ; Sat, 15 Sep 2007 03:12:11 -0500 (CDT) Received: by larseighner.com (nbSMTP-1.00) for uid 1001 lars@larseighner.com; Sat, 15 Sep 2007 03:11:55 -0500 (CDT) Date: Sat, 15 Sep 2007 03:11:54 -0500 (CDT) From: Lars Eighner X-X-Sender: lars@debranded.6dollardialup.com To: freebsd-questions@freebsd.org Message-ID: <20070915025950.T53308@qroenaqrq.6qbyyneqvnyhc.pbz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Sanitizer: Anomy and SpamAssassin mail filter - see http://www.6dollardialup.com/support/spaminfo.html X-Spam-Status: No, hits=0.0 required=10.0 tests=OACYS_SINGLE,SIGNATURE_SHORT_DENSE,TW_BD,TW_KB version=2.43 X-Spam-Level: Subject: What to use for conio? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Sep 2007 08:12:14 -0000 What I really want to do: capture keypresses (including function keys) from a (virtual) terminal without their echoing or without having to enter a new line (i.e. hit return). Why I do not want to use (n)curses: to use keypad in ncurses, I have to initscr() and ncurses will then blank the screen and seize the terminal. I do not want that to happen. I want to write ANSI directly to the terminal and get non-echoing keypresses back. Why I think I need something like conio: I think I could get stdio to do what I want if I had something like kbdhit from conio, but conio doesn't exist pretty much anywhere outside of DOS. I'm pretty sure the system conSio is not anything like what I want. So how can I get non-echoing keypress without turning my terminal over to the tender mercies of ncurses? -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266