On Tuesday, September 11 at 07:48 AM, quoth Mutt:
But remember that in Mutt, the backspace key is not used in the editor only, but also in the index, the pager and so on.
So what? Should mutt not be consistent? If I have: bind index <BackSpace> delete-message bind editor <BackSpace> backspace...should I not expect that in both cases I am referring to the same key?
And what if some user prefers to use the delete key as erase?
Then good for them! They should use stty to set the erase sequence to be ^[[3~. Once the user has done so, however, when the user later presses the key labeled "backspace", why should mutt be expected to know that the key the user pressed has ink on it that says "backspace"? It *shouldn't* be expected to, because of course it can't. Mutt should say to itself "what key has the backspace effect? this must be what the user is referring to when the user says <BackSpace>, because I have no way of knowing which key on the keyboard has 'Backspace' printed on it, or even if there is one." When the user sets some other key as the "erase" key, that key, by definition, becomes the backspace key. Whatever was previously considered the backspace key is now just a generic key. No matter what's printed on that key, no matter what position it has in the keyboard, that's all irrelevant because the computer can't be expected to know!
Think of it like binding keys in a video game. Your joystick may have buttons labeled "Fire" and "Shield", but if you tell the videogame that the "Fire" button should trigger the shield, then the button with "Shield" printed on it is now just an arbitrary button that emits a certain character sequence. The ink on its surface gives it no particular claim to the title "the shield button". The button labeled "Fire" is now the shield button. In the same way, when I set some character sequence (such as ^[[3~) to be the "erase" sequence, I am defining whatever key emits that sequence to be the "backspace" key, no matter what happens to be printed on the actual buttons, because that's the key that performs a backspace.
<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.
~Kyle --If A equals success, then the formula is A=X+Y+Z. X is work. Y is play. Z is keep your mouth shut.
-- Albert Einstein
Description: PGP signature