Re: problem with backspace key in xterm-256color
Thanks Kyle!
That helped my solve the problem by using "\177" instead of
<backspace> in the .muttrc
Here is the info ...
On 06/15/08 16:55, Kyle Wheeler wrote:
> On Sunday, June 15 at 05:11 PM, quoth Marianne Promberger:
>
> > Now I've noticed that with TERM=xterm-256color, mutt doesn't
> > recognize the backspace key in the index or the pager (I have
> > bindings for <backspace> in the .muttrc, but it says "key not
> > bound"). When I set TERM to "xterm", the backspace key works fine.
>
> Interesting... does the terminal actually alter what it emits? In
> other words, when you press control-V backspace, what shows up in your
> shell, and does what shows up change based on the TERM setting?
both with TERM=xterm and TERM=xterm-256color, pressing Ctrl-v
backspace shows up as:
^?
Whatever that means. However ...
> If
> not, is your termcap perhaps different? Try these two commands:
>
> infocmp -1 -L xterm | grep key_backspace
key_backspace=\177,
> infocmp -1 -L xterm-256color | grep key_backspace
key_backspace=^H,
> They *should* be the same, but if they're not on your system, that
> would explain your problem (both should print out
> "key_backspace=^H,").
Okay, so I solved my problem very pragmatically by just putting
bind index \177
instead of "bind index <backspace>", and it works.
That is good enough for me, as I'm lazy and I'd rather not recompile
mutt with slang :)
But it occurred to me that another way to solve this would be if mutt
skipped checking for my terminal's color support. I mean, whether I
have TERM set to xterm or xterm-256color doesn't actually change the
colors it supports, as far as I can tell, since I can use lots of
colors from a palette for e.g. the way folders are distinguished from
files etc. Or does it?
If mutt could skip checking for TERM=xterm-256color, that would make
my life easier anyway, since with that TERM some remote shells refuse
to operate, because they say "I know nothing about your terminal"
(I've worked around that problem by setting practically all my ssh
.bashrc aliases to start with "export TERM=xterm && ssh ... ".
Yes, one dirty workaround after another, I know ... :)
m.