Subject: Re: zsh - vt emulation
To: Bernard Gardner <B.Gardner@eng.usyd.edu.au>
From: David Brownlee <david@mono.org>
List: port-mac68k
Date: 03/06/1996 10:44:25
	Dec terminals can run in two different modes - I thnk they are
	called 'standard' and 'application'.

	One gives the ^[[ prefix for cursor keys, the other ^[O.

	AFAIR termcap's init string switches to application mode and
	the exit string switches back (so apps that use termcap correctly
	get the right sequence all the time).

	I have an app that hardcodes fallback values for both types due to
	it being used on broken systems and with broken users from time	to
	time (what terminal type? uhh - its a 'pc' :)

                   David/abs             (david@mono.org)

+44 181 888 8949 System Manager, Southern Studios Ltd, Box 59, London N22 1AR
 >=- OpenBSD http://www.openbsd.org. Free un*x for {sparc,i386,m68k,...} -=<
       <<< Monochrome - Largest UK Internet BBS - telnet mono.org >>>


On Wed, 6 Mar 1996, Bernard Gardner wrote:

> 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).
>
> Bernard.
>