emacs-devel
[Top][All Lists]
Advanced

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

Re: Ctrl-[ ?


From: Stefan Monnier
Subject: Re: Ctrl-[ ?
Date: Thu, 06 Jun 2019 08:58:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I found on Stackoverflow that C-[ was pretty much hard-coded as
> ESC. Why is that ?

Under most terminals, `escape` and `C-[` send the same byte sequence,
i.e. a single byte 27 which corresponds to the ascii ESC character.

For this reason, when the GUI version of Emacs was introduced (where the
two keys are clearly distinguished), Emacs added `function-key-map`
entries to turn `escape` into ESC when there's no specific `escape`
binding (the mapping from `C-[` to ESC is done at a much lower level,
this one definitely counts as hardcoded).


        Stefan




reply via email to

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