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

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



Vincent Lefevre wrote:
> 
> On Fri, Oct 25, 2002 at 22:57:03 +1000, Russell wrote:
> > I'm assuming TERM="xterm".
> 
> I use either TERM=xterm-xfree86 or TERM=xterm-vt220 (but the escape
> sequences for Home and End keys don't depend on which value I choose).
> 
> > Type: echo -ne "\e[c" and see what numbers are returned in
> > both terminals.
> 
> RedHat: 1;2c

I get that too. It means: VT100 with Advanced Video Option

> (I can't try the Debian one here.)
> 
> > > But anyway, the escape sequences are not the same.
> > >   * Xterm on RedHat: ^[[H and ^[[F
> >
> > The terminal is set for "normal cursor keys" (DECCKM).
> > Set it to "application cursor keys". Type: echo -ne "\e[?1h"
> 
> This doesn't change anything in practice. I think that zsh isn't
> configured for Home and End.

After doing echo -ne "\e[?1h", does Home still give ^[[H  ?

> However, when I connect to some other machine (from the xterm) and
> execute bash, this solves the problem there. But I think that the
> right solution is to configure bash correctly, as the application
> cursor mode is disabled after using some applications (e.g. less).

For a bash-specific fix, you could try: set enable-keypad on.
Maybe zsh has a similar setting.



Reply to: