Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh & HP Term



On Fri, Apr 28, 2000 at 04:19:29AM +0000, you [Bart Schaefer] claimed:
> On Apr 27, 11:02am, Ville Herva wrote:
> } Subject: Re: zsh & HP Term
> }
> } Propably not strictly related to zsh, but I'll ask anyway: I'm having a
> } bit different problem with terminal under HPUX 10.20. Most if not all
> } programs I run seem to ruin my terminal settings so that when I return to
> } zsh, arrow keys work no more.
> 
> Many terminals have two modes, the "normal" mode and the "keypad" mode.
> The arrow keys often send different character sequences in the different
> modes.  What's happening is that your terminal is getting switched from
> one mode to the other and not switched back.  This is probably a result
> of a problem with the termcap or terminfo description of your terminal.

Yes I thought so, but I never found better termcap for the HP. I tried
some but with no luck.

> The easiest thing to do is use bindkey to bind both the keypad and normal
> arrow key sequences to the same ZLE actions.  Most probably that means
> something like this:
> 
> bindkey '\e[A'	up-line-or-history
> bindkey '\e[B'	down-line-or-history
> bindkey '\e[C'	forward-char
> bindkey '\e[D'	backward-char
> bindkey '\eOA'	up-line-or-history
> bindkey '\eOB'	down-line-or-history
> bindkey '\eOC'	forward-char
> bindkey '\eOD'	backward-char

Marvellous! That solved it. If I had only asked this three years
earlier... Oh well.

> Hey, PWS:  You might want to mention keypad mode in the FAQ answer 3.8.

Good idea...


-- v --

v@xxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author