Provides a global minor mode esc-mode
to make the escape key behave
like a normal escape key, in both GUI and terminal Emacs, without
interfering with commands that rely on terminal escape key sequences,
such as M-f, xterm-mouse-mode
, etc.
Clone the stable branch:
git clone -b stable https://gitlab.com/lae/emacs-esc.git
Add to your Emacs init file:
(add-to-list 'load-path "<path-to-cloned-directory>")
(require 'esc)
(add-hook 'emacs-startup-hook 'esc-mode)
esc-mode
will bind a special function to ESC in
input-decode-map
, if you try to bind any key prefixed with
ESC in there after esc-mode
is enabled, you'll see an
error Key sequence <your-keys> starts with non-prefix key ESC
,
therefore you need to add such key bindings before enabling
esc-mode
.
Customizations can be done via: M-x customize-group
return esc
return.
esc-quit-function
: Name of function to call when escape is pressed on its own. Default is to delegate to whatever action that is under C-g at the time of invocation.