Subject: Re: CVS commit: basesrc/bin/ksh
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 09/28/2002 15:38:37
[ On Saturday, September 28, 2002 at 20:41:24 (+0200), der Mouse wrote: ]
> Subject: Re: CVS commit: basesrc/bin/ksh
>
> >> The NetBSD console gives ^[[8~
> >> for <END> not ^[[F
> > A, well then I guess on some versions of NetBSD, including what
> > you're using, the console is not ANSI x3.64 compatible.
> 
> I'm fairly sure that X3.64 specifies interpretation of escape/control
> sequences on output and has nothing whatever to do with converting
> keystrokes into anything else on input - with the arguable exception of
> the KAM mode for SM/RM sequences, which has nothing to do with the
> subject at hand (it corresponds to a "keyboard locked" state).

I don't have the full X3.64 spec., but I do know that the cursor keys in
ANSI mode are expected to generate <ESC>[A and so on.  The <HOME> key is
well defined too as <ESC>[H, but indeed I'm unsure of the <END> key.

This is what you'll find in termcap and terminfo deinfitions too, such
as these terminfo values for the various sequence generated by keys on
an ANSI-compatible terminal from the "ansi" terminfo entry:

        key_backspace=^H,
        key_btab=\E[Z,
        key_down=\E[B,
        key_home=\E[H,
        key_ic=\E[L,
        key_left=\E[D,
        key_right=\E[C,
        key_up=\E[A,

In general I've always understood it to be that the expectation is that
the keys will generate whatever sequence would be necessary to have the
expected effect on the display when a loopback is connected to the data
port.

-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>