[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Home and end keys (was Re: Make Debian better)



On Sun, Oct 27, 2002 at 12:45:18 +1100, Russell wrote:
> Vincent Lefevre wrote:
> > OK, so Home and End should be CSI 1 ~ and CSI 4 ~. This is also what
> > I get with the Nettle terminal under RISC OS.
> 
> I've tried those sequences with: echo -n "^[[1~" >/dev/pts/1
> but had no success. Those codes are not in the terminfo listing
> for xterm. All i can suggest is to try and get the
> Home/End keys to emit ^[OH / ^[OF  ( SS3-H or khome, SS3-F or kend).

Hmm... I know know. This is because I use the VT220 keyboard. With
it, I get "^[[1~" and "^[[4~". And I use the corresponding terminfo
xterm-vt220, which defines the correct values for khome and kend.

BTW, I can probably use something like tput to configure zsh bindings.
This will allow me to get the correct values that correspond to the
current terminal.

> > Non, I never user TERM="xterm" as it is too generic (it doesn't always
> > have colors, nor bce).
> 
> *VT100*colorMode: on, or maybe *XTerm*colorMode: on.

On some machines (Solaris), there are xterms that don't support color,
so this is not OK, as my Xresources is shared.

> See /etc/X11/app-defaults/XTerm-color. There are also
> ESC codes to enable xterm colors.

This is not sufficient: one needs a TERM value that defines color
*and* bce (neither xterm, nor xterm-color does, because they are
too generic).

> > But even with the same value of TERM, the sequence depends on the
> > machine. This isn't normal.
> 
> Type "infocmp" on both machines and see if the first couple of
> lines of the listing matches the TERM being used.

In fact, this wasn't related to the value of TERM. I thought that by
changing the value of TERM, this would have changed this would have
changed the keyboard used (and the escape sequences generated by xterm)
but this is not true. A bug in xterm (or missing feature)?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Reply to: