#3962: Backspace Key doesn't work in pager and Tmux
-----------------------------+-----------------------
Reporter: ManDay | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: user interface | Version:
Resolution: | Keywords: BackSpace
-----------------------------+-----------------------
Comment (by kevin8t8):
Mutt is relying completely on ncurses for the backspace key translation.
You can peek inside keymap.c if you're comfortable looking at code: the
"<backspace>" key name is mapped to the KEY_BACKSPACE keymap as defined by
ncurses. Further below, you can see:
{{{
km_bindkey ("<backspace>", MENU_PAGER, OP_PREV_LINE);
}}}
which binds this keyname to the "previous line" operation in the pager.
The reason why the line editor is working is because Mutt binds multiple
keys to the editor backspace operation:
{{{
km_bindkey ("<backspace>", MENU_EDITOR, OP_EDITOR_BACKSPACE);
km_bindkey ("<delete>", MENU_EDITOR, OP_EDITOR_BACKSPACE);
km_bindkey ("\177", MENU_EDITOR, OP_EDITOR_BACKSPACE);
}}}
I'd guess that the terminal is actually sending the "delete" key when you
hit backspace. You may want to try running
{{{
:bind pager <delete> previous-line
}}}
and see if that "fixes" the problem. If you aren't binding delete to
anything in the pager, you could just add that to your .muttrc.
Alternatively, this may be something in either tmux or your terminfo that
isn't quite right. I'm not really a terminfo expert, so that's a bit
beyond what I can help with.
--
Ticket URL: <https://dev.mutt.org/trac/ticket/3962#comment:1>
Mutt <http://www.mutt.org/>
The Mutt mail user agent