Variable: evil-intercept-esc

evil-intercept-esc is a customizable variable defined in evil-vars.el.

Value

always

Documentation

Whether Evil should intercept the escape key.

In the terminal, escape and a meta key sequence both generate the same event. In order to distingush these, Evil uses input-decode-map. It is not necessary to do this in a graphical Emacs session. However, if you prefer to use "C-[" as escape (which is identical to the terminal escape key code), this interception must also happen in graphical Emacs sessions. Set this variable to always, t (only in the terminal) or nil (never intercept).

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-vars.el
(defcustom evil-intercept-esc 'always
  "Whether Evil should intercept the escape key.
In the terminal, escape and a meta key sequence both generate the
same event.  In order to distingush these, Evil uses
`input-decode-map'.  It is not necessary to do this in a graphical
Emacs session.  However, if you prefer to use \"C-[\" as escape (which
is identical to the terminal escape key code), this interception must
also happen in graphical Emacs sessions.  Set this variable to
`always', t (only in the terminal) or nil (never intercept)."
  :type '(radio (const :tag "Never" :value nil)
                (const :tag "In terminal only" :value t)
                (const :tag "Always" :value always))
  :group 'evil)