Re: [Mutt] #2952: <BackSpace> should use terminal settings
#2952: <BackSpace> should use terminal settings
Comment (by Vincent Lefevre):
On 2007-09-11 12:36:36 -0500, Kyle Wheeler wrote:
> On Tuesday, September 11 at 04:56 PM, quoth Mutt:
>>> <BackSpace> must be defined by behavior, not by the ink printed on the
>>> key, because of course no program can know what's printed on the key.
>> No, that's not how the terminfo works. <BackSpace> means the backspace
>> key. No more. Just like <Left> means the left key and so on.
> How is the terminfo supposed to know what the user has painted on their
It doesn't need to.
> It can't know whether the backspace key emits a ^H or a ^? (or any
> other value), so why pretend that it's an authoritative resource on
> the question of what the backspace key emits?
This is not specific to backspace. Same problems can occur with the
arrow keys, page up, page down, home, end and probably other ones,
because there isn't a single standard, and different terminals
generate different sequences. The only solution is to make sure
that the terminfo data match what the terminal sends.
> What it all really boils down to as far as what we mean when we say
> "the backspace key" is "that key that we press that we think will
> delete the character to the left of the cursor" and no more.
No, the backspace key is just the key named "backspace". No more.
The fact that you can do "stty erase <some_key>" won't change the
backspace key. You just change the erase character, or if you want
the binding of the erase function to some key. If some user does
"stty erase r", the key 'R' will still be the key 'R'. You can't
say that it is the backspace key.
Ticket URL: <http://dev.mutt.org/trac/ticket/2952#comment:>