0

Apparently pressing C-[ (three times in a row it seems?) (or alternatively ESC three times) closes a frame. I oftentimes accidentally press C-[ when I meant to press C-p. I tried to disable it with

(define-key "\C-[" KEY nil) which does nothing

as well as

(dolist (key '("\C-["))
 (global-unset-key key))

which for some reason makes my meta key not work anymore.

How can I disable \C-[?

lo tolmencre
  • 169
  • 6

1 Answers1

0

C-[ is bound to ESC with this knowledge:

Your question has already been answered here and here

For how to remap ESC have a look here.
For remapping ESC see last link the correct order is:

(define-key key-translation-map (kbd "C-<escape>") (kbd "ESC"))
(define-key key-translation-map (kbd "ESC") (kbd "C-g"))
jue
  • 4,476
  • 8
  • 20
  • Instead of repeating an answer to a duplicate question, please vote to close the question as a duplicate. – Drew Jul 20 '17 at 04:31