handling escape characters

Bob McGowen Wyse Technology Training bob at wyse.wyse.com
Thu Aug 3 09:27:55 AEST 1989


In article <1989Aug2.164100.7912 at elroy.jpl.nasa.gov> paul at jane.jpl.nasa.gov (Paul Asmar) writes:
>
>	Has anyone had to write some sort of an editor, and had to deal
>with the escape key carrying on several meanings (i.e. the escape
>sequences, and the key itself).  I was wondering if someone can help
>me figure out what is a good way to implement this.  And, does anyone
>know how "vi" deals with this problem?
>
>Paul
>
>--
>Paul Asmar (paul at jane.jpl.nasa.gov)

In one of the texts I once read, it was stated that vi using a timing
method to determine the difference.  If the character following the
ESC is inside the timeout, then it is an escape sequence, otherwise
it was entered by the user.

This can cause problems if the system introduces a delay between the
ESC and the next character (I have had this happen to users who hit
an up or down arrow key rapidly several times).  The result is finding
the cursor somewhere else, often in text entry mode.

Bob McGowan  (standard disclaimer, these are my own ...)
Customer Education, Wyse Technology, San Jose, CA
..!uunet!wyse!bob
bob at wyse.com



More information about the Comp.unix.wizards mailing list