[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Round-tripping key definitions

From: Stefan Monnier
Subject: Re: Round-tripping key definitions
Date: Sun, 14 Nov 2021 09:27:02 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> And you believed that somebody?
> That somebody could have been me.  My understanding has always been that
> a terminal will send ASCII char 9 when you type either the TAB key or C-i
> (and similarly for the other special cases).

I'm not proposing to solve that problem magically.

I'm proposing to make the key names `C-i` and `TAB` distinct, such that
hitting `C-h c TAB` in a tty would/could tell the users something
like "TAB (translated from C-i) runs the command ...".

Then again, maybe we'd want to finally get rid of the conflation between
"control modifier + key" and "ASCII control char".  But that's harder
(because it affects ELisp source code, where `?\C-i` is 9 rather than
#x4000069, so either we keep `?\C-i` as 9 and introduce a new syntax
for "character i with a control modifier", or we change the value and
risk breaking some programs (tho maybe we can auto-fix the vast
majority with appropriate heuristics)).

[ BTW, I just noticed that `?\C-é` is 137, which seems like a plain bug.  ]

> In GUI environments I'm sure the combination of the Ctrl key and "i"
> can be recognised independently; but how could that work in terminals?

I'm not suggesting to solve this problem (BTW, it can be solved by
having the terminal send a different byte sequence for TAB and C-i,
which several terminals are already able to do, but that's a separate
issue from what is discussed here).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]