Subject: Re: zsh - vt emulation
To: None <port-mac68k@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: port-mac68k
Date: 03/06/1996 12:22:21
In article <9603061552.ZM11929@marvin.eng.usyd.edu.au> B.Gardner@eng.usyd.edu.au (Bernard Gardner) writes:
>On Mar 6,  1:22, Julian Bean wrote:
>> Subject: Re: zsh - vt emulation
>
>> zsh is expecting (it's hard-coded into zle_main.c, for those with a copy of
>> the source handy) "^[[" to introduce an arrow key, followed by {A,B,C,D},
>> whilst apparently both the console and dt send "^[O"{A,B,C,D}.
>>
>> Does anyone understand this discrepance.  Valtteri Vuorikoski says that dt
>> can be re-configured by #defining PRESENTATION in config.h, but I am
>> intrigued as to what the 'standard' is here, and who is 'wrong'.
>
>Why anyone would hard code this is beyone me, but on a geuine vt220 I have
>sitting here next to me, the arrow keys are sending <ESC>[{ABCD}, not
><ESC>[0{ABCD}
>
>This may be the difference between some of the modes in the vt series (e.g.
>user keys vs system keys), I'm not prepared to say anyone is wrong, this is
>just what the terminal here does.
>
>I think that's probably as close to a "standard" as you'll get. (Unless someone
>wants to do this on a real vt100, all of the ones I have access to are spare
>parts now).

The keys in application mode send ^[OA, ^[OB, ^[OC, ^[OD instead of
^[[A, ^[[B, ^[[C, ^[[D.

you can switch to application mode with = or something like that.

christos