Behaviour of setjmp/longjmp and registers

Dave Hammond daveh at marob.MASA.COM
Wed Feb 8 11:34:28 AEST 1989


In article <9597 at smoke.BRL.MIL> (Doug Gwyn (VLD/VMB) <gwyn>) writes
[concerning multi-byte keystroke sequences]:
>
>The character sequence should follow ANSI X3.64, meaning that it begins
>with an ESC character and continues through an alpha.  That can be
>parsed without any timeouts at all.

Considering the number of display manufacturers *not* using ANSI X3.64
sequences, this seems a bit narrow-minded.

>What probably is contributing to the confusion is that you bought
>keyboards that have an ESC key the user can press that violates the
>X3.64 standard.  Remove the key or tell your users how to recover
>from it (treating a second consecutive ESC specially is one way).

The very "feature" which drove me away from VT-220's was the lack of
a real ESC key.  Substituting Shift-F12 (or even programming an
unshifted F-key) just doesn't cut it.  I'm sure you can think of several
programs which would break without an ESC key.

Handling keyboards which may transmit their multi-byte sequence intro
key as a single byte key is not especially difficult.  You do have to
rely on some sort of timeout, but there are adequate calls available
on most OS's to either read with timeout or peek at the keyboard queue.
Timeouts of 1/4 to 1/2 sec. on a 9600 baud serial line are adequate to
distinguish between single bytes and failed sequences -- and barely
noticeable as a "delay" to the user.

--
Dave Hammond
...!uunet!masa.com!marob!daveh
daveh at marob.masa.com



More information about the Comp.lang.c mailing list