Is there any way to bind C-[
to something and not have all M-
(Meta) bindings messed up?
Not the first time this question comes up. Unfortunately, the only solution offered in the previous thread is a) Linux specific, b) requires an external tool (again Linux specific) that has nothing to do with Emacs. In the same vein I could have used something like Karabiner on a OS X to steal the C-[
sequence before Emacs ever gets it but this is clunky and expensive.
Given that it is Emacs that insists on translating C-[
to ESC
, C-i
to TAB
and probably others I would very much like to break these relationships and get precious key sequences back. Recently I ran full speed into this problem and blamed quiet innocent smartparens mode.
A possible solution that involved function-key-map
and key-translation-map
was discussed here but alas it either no longer works or did not work in the first place (or I'm doing something wrong). I think it was going in the right direction though.
C-[
toESC
". The two are the same thing. Likewise,C-i
andTAB
are different names for the same ASCII control code.C-[
(pressCtrl
and hit[
) to theC-[
control character (aka theESC
character), but no, that is not obligatory for someone designing an editor. And yes, Emacs does that.C-[
andESC
are the same character, but the keysCtrl
+[
andEsc
need not be mapped to any particular characters.