<<< Date Index >>>     <<< Thread Index >>>

Re: [Mutt] #2952: <BackSpace> should use terminal settings



#2952: <BackSpace> should use terminal settings

Comment (by Vincent Lefevre):

 {{{
 On 2007-09-13 11:31:26 -0500, Kyle Wheeler wrote:
 > The configuration of the BackSpace key *does* matter because it is not
 > simply ignored for keyboards that do not have keys named "backspace". On
 > the contrary, mutt will still insist that a <BackSpace> key exists, and
 is
 > signified by ^H.

 Not necessarily ^H. The sequence is defined in the terminfo data.
 This is true for any special key.

 > Thus, when another key is pressed that happens to emit ^H,
 > mutt presumes that the BackSpace key was pressed.

 Yes, Mutt (in fact, the curses library) cannot make the difference
 (well, AFAIK, some libraries could support a maximum delay between
 the characters, but this can lead to problems on slow SSH connections,
 even ADSL).

 > In other words, mutt recognizes the backspace key by what it *does*
 > rather than by how it is *named*.

 No, it recognizes the keys by what sequence of characters is sent by
 the terminal. In the terminfo data, I have: "kbs=\177". This means
 that the backspace key (kbs) is recognized if ^? is generated by the
 terminal.

 > Any key that emits the appropriate byte sequence is assumed to be
 > the backspace key, regardless of what that key *actually* is.

 Yes, the byte sequence given in the terminfo data. But this isn't
 necessarily the erase character.
 }}}

-- 
Ticket URL: <http://dev.mutt.org/trac/ticket/2952#comment:>