Subject: Re: zsh - vt emulation
To: None <port-mac68k@NetBSD.ORG>
From: russ <russ@seismo.demon.co.uk>
List: port-mac68k
Date: 03/06/1996 08:45:00
jules@mailbox.co.uk (Julian Bean) wrote
>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'.
This stuff takes me back a long, long way! As I recall, the VT100 was
capable of sending either sequence, depending on which mode it was in.
The VT52 which preceded it sent only the <ESC>[A style codes, so this
capability was needed for backward compatibility. You got the whole
function set when you switched to 'application mode'; there were so many
possibilities that they couldn't be dealt with in the <ESC>[<letter>
format, and so DEC introduced the <ESC>[<number><letter> idea. DEC's
own PDP-11 software (e.g. RSX-11 EDT and its relations) put the terminal
into application mode, but most Unix systems just left the keyboard in
the boot-up VT52 mode and took advantage of the extra screen addressing
functions the VT100 offered. Compare vi and EDT to see the outcomes!
So it seems that zsh is (strictly) configured for a VT52 keyboard i.e.
VT100 using VT52-emulation codes, and that dt is (strictly) configured
for VT100 application codes. Both authors are at least half-right, but
the two parts don't quite match ... neither of them is 'wrong'; they
are coming from different traditions.
Now, which cupboard did I throw those old VT series manuals into?
Russ