Re: [PATCH] Change <delete> to delete forward in the editor menu.

Vincent Lefevre <[email protected]> Tue, 28 Jul 2026 23:37:17 +0200
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On 2026-07-26 22:33:44 -0300, Jim via Mutt-dev wrote:
> For example, the VT240, a very common terminal in its day had a Delete key
> (whose keycap sometimes said "Delete", and sometimes had a little icon on it)
> just above the return key, and that pressing that key sent the ASCII delete
> character.
> 
> See https://www.nf6x.net/wp/wp-content/uploads/2014/01/IMG_2839.jpg for a
> picture of a version of the keyboard with the icon rather than the word
> "Delete".

So, at that time, it appears that "delete" was used for what we
call "backspace" nowadays. The behavior is the same: delete the
character on the left of the cursor.

The name of the associated ASCII code 0x7f ("delete") has not changed,
though.

> >> (Well, with the possible exception of an APL terminal; as you may know,
> >> in APL backspace didn't delete, because there were some characters
> >> composed as <char 1><backspace><char 2>.)
> 
> > IMHO, you are not talking about the usual BackSpace key here,
> 
> Where are you referring to?  I had talked about two things.
> 
> In the first one, I was indeed talking about a physical key on a keyboard.
> 
> In the second one, I was talking about whatever an IBM 2741 terminal did
> when you pressed the backspace key.  What it didn't do in that situation
> was delete the character... it moved backward.

So what was called "backspace key" at that time is not what we call
"backspace" nowadays. I suppose that this key was sending the ASCII
"backspace character" (code 8), not the "delete character" (code 7f).

> > At some point (possibly introduced by Microsoft), the BackSpace key
> > was sending the character of code 8 and the Delete key was sending
> > the character of code 127 (0x7f), and on such a system, the character
> > of code 8 was deleting backward and the the character of code 127
> > was deleting forward.  But later, this was assumed to be incorrect,
> > and nowadays, with most system configurations, the BackSpace key
> > sends the character of code 0x7f (which was originally the character
> > to delete backward) and the Delete key sends some special escape
> > sequence.
> 
> Just to be clear, are you talking about current ("IBM") PC keyboards?

Yes. But this has been standardized:

  https://en.wikipedia.org/wiki/ISO/IEC_9995

> > With Xorg, the BackSpace key still sends the character of code 8
> > and the Delete key sends the the character of code 0x7f, as given
> > by XLookupString (seen with xev, for instance).  However, I suspect
> > that XLookupString is mostly ignored by the applications, in favor
> > of the keysym.
> 
> On my system XLookupString gives the same character (for the backspace and
> delete keys) as listed for the keysym.

What do you mean?

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)