From: Wolfgang Denk Date: Fri, 18 Aug 2006 21:50:11 +0200 Subject: [U-Boot-Users] non-canonical input mode for standalone app In-Reply-To: Your message of "Fri, 18 Aug 2006 10:52:36 PDT." Message-ID: <20060818195011.D6B06352627@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message you wrote: > In my standalone application, I'd like to implement a menu system based on > single keystrokes. Exported function tstc() won't return any keystrokes > until I hit the ENTER key. How can I turn off canonical input for a > standalone application? Your message makes no sense. tstc() *never* returns any keycodes. It returns 1 if there was any key pressed (without actually emptying the receive buffer). What you probably might want is getc(), and this function returns each and every key code without any processing. Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Even historians fail to learn from history -- they repeat the same mistakes. -- John Gill, "Patterns of Force", stardate 2534.7