On Jun 6, 2019, at 22:01, Eli Zaretskii <eliz@gnu.org> wrote:

From: Mattias EngdegÄrd <mattiase@acm.org>
Date: Thu, 6 Jun 2019 14:44:31 +0200
Cc: Emacs developers <emacs-devel@gnu.org>,
       Jean-Christophe Helary <jean.christophe.helary@traduction-libre.org>

6 juni 2019 kl. 12.12 skrev Eli Zaretskii <eliz@gnu.org>:

It isn't hardcoded in Emacs, it' "hardcoded" in the way the OS produces character codes when you type keys on the keyboard.  C-[ produces ESC for the same reason C-i produces TAB and C-j produces RET: these keys emit the same codes as the corresponding Ctrl sequences.

The above is true when Emacs is running in a terminal. Otherwise, Emacs has code to emulate that behaviour (make_ctrl_char), so that we can enjoy a whiff of early 1960s bit-paired keyboards. And this does appear to be hard-coded, in the sense that it cannot be disabled.

Why is it useful to have different behavior on GUI and TTY frames?

Because expectations are different ?


Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune