On Thu, Jun 25, 2026 at 04:44:02AM +0200, Vincent Lefevre wrote:
On 2026-06-25 10:06:44 +0800, Kevin J. McCarthy wrote:
The meta() call enables 8-bit mode on a terminal via the smm terminfo
entry (or the CS8 flag).  This is an older mode that most likely isn't
necessary anymore.  On many terminals it allows Alt-x to be sent as an
8-bit value instead of Esc-x.

This is not the case with xterm. If xterm is configured to make Meta
send ESC + character, then the meta() call will have no effect. The
meta() call only changes between the following modes:
 * Meta has no effect (the character is sent unmodified).
 * Meta sets the eighth bit of the character.

If I understand correctly, in foot, the meta() call changes between:
 * Meta sends ESC before the character.
 * Meta sets the eighth bit of the character.

I would welcome help in making the commit message clearer. Would it be enough to change the sentence to say "On some terminals it allows Alt-x to be sent as an 8-bit value instead of Esc-x."?

I'm trying to debug exactly what it's doing on foot and xterm. It doesn't seem to be simply flipping bit-8 on, because setting $meta_key isn't fixing the problem. I haven't had time yet to look into it deeply, but I will try this weekend.

--
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA

Attachment: signature.asc
Description: PGP signature

Reply via email to