Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: Trouble with Curses Keywords: Accursed Termcap & Terminfo Message-ID: <27697@mimsy.umd.edu> Date: 15 Nov 90 12:33:35 GMT References: <1990Nov14.061635.6183@sysint.uucp> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 27 In article <1990Nov14.061635.6183@sysint.uucp> duncan@sysint.uucp (Duncan MacGregor) writes: >... characters read through the curses library disappeared after >an ESC (escape, octal 033) character was read. ... > The problem lies not in curses but (I believe) in termcap. I know the >problem exists in "terminfo", which is the replacement for termcap in System V >Rel. 2 and all descendant systems; I believe it was inherited (or should I >say inherent?) from termcap. No, the problem is in curses (if any particular bit of software can be blamed), not termcap or terminfo. Neither termcap nor terminfo provide any input-handling routines. They exist only to describe the terminal's interface and handle output parameters (for, e.g., cursor motion). >The problem is caused by the necessity of dealing with "function keys", >"cursor keys", and other symbolic keys on the keyboard. Right. The timing code for curses `getch', however, is entirely in curses (and the 4BSD termcap-based curses provides no function key decoding at all, so it is not in all versions). Because keystrokes can be arbitrarily delayed (e.g., by networks), the timer hack is not such a great solution. My own solution is never to use function keys. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 405 2750) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris