Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen Wyse Technology Training) Newsgroups: comp.unix.wizards Subject: Re: handling escape characters Message-ID: <2339@wyse.wyse.com> Date: 2 Aug 89 23:27:55 GMT References: <1989Aug2.164100.7912@elroy.jpl.nasa.gov> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen Wyse Technology Training) Organization: Wyse Technology Lines: 27 In article <1989Aug2.164100.7912@elroy.jpl.nasa.gov> paul@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@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@wyse.com