Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!lll-tis!daitc!jkrueger From: jkrueger@daitc.daitc.mil (Jonathan Krueger) Newsgroups: comp.databases Subject: Re: Informix problem with escape sequences Message-ID: <191@daitc.daitc.mil> Date: 3 Oct 88 07:50:21 GMT References: <483@pan.UUCP> <860@vsi.UUCP> <262@fsc2086.UUCP> <12648@ncoast.UUCP> Reply-To: jkrueger@daitc.daitc.mil.UUCP (Jonathan Krueger) Organization: Defense Applied Information Technology Center, Alexandria VA Lines: 34 In article <12648@ncoast.UUCP> allbery@ncoast.UUCP (Brandon S. Allbery) writes: >The problem is handling ESC-prefixed keys while also using a bare ESC >as a command I agree with your assessment of the problem; formally, it's an ambiguous input stream. But timing isn't a safe disambiguating method. Terminal interfaces make no guarantees about maintaining the timing characteristics of user typing. Characters that were bunched together when typed won't necessarily be bunched together when they arrive at the host. If they're meaningful either way, but mean different things, users will get unreliable and unpredictable responses to same inputs. I've seen Unify lose pretty badly when connected via networks such as TYMNET or DDN. A better solution is to remove the ambiguity. In general, function keys generate a sequence that begins with an escape. So, don't support function keys and also escape by itself as a command. But you can assign a function key to perform whatever escape used to do. Or you can support an interface that doesn't depend on function keys, and retain escape by itself as a command, useful for terminals without lots of function keys. INGRES supports both approaches. Or you can remove escape by itself as a command, use function keys where available, and support user-typed sequences that begin with escape, including longer commands that echo on a command line. GNU Emacs does this. All three methods work correctly across all communications equipment and paths, and with all UNIX (and other) terminal drivers. -- Jon -- Jonathan Krueger uunet!daitc!jkrueger jkrueger@daitc.arpa (703) 998-4777 Inspected by: No. 15