Distinquishing escape key from arrow and function keys

John Temples john at jwt.UUCP
Sun Apr 14 02:33:13 AEST 1991


In article <4193 at uakari.primate.wisc.edu> bin at primate.wisc.edu (Brain in Neutral) writes:
>On a BSD system, select() does the timeout nicely.  I'm not so familiar
>with System V.  Do you use the MIN and TIME special control character
>values in the termio.c_cc[] array?

System V curses works the way you describe, i.e., it can distinguish
between ESC and ESC[A, and return the application a single token for
either input.  What I don't know is how curses implements this.  On my
System V box, you cannot set MIN=1 and TIME=1 to get a .1 second
timeout on a single character read, nor should you be able to,
according to termio(7).  We had a discussion about this very topic
right here a few months back, and I don't think anyone knew how to do
it on System V, even though it obviously can be done.
-- 
John W. Temples -- john at jwt.UUCP (uunet!jwt!john)



More information about the Comp.unix.programmer mailing list