I want to bind
ESC to quit from multiple-cursor mode.
This code doesn't work:
(define-key mc/keymap (kbd "<ESC>") 'mc/keyboard-quit)
How can I do it?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
In order to use
define-key you should try using the snippet below:
(with-eval-after-load 'multiple-cursors-core (define-key mc/keymap (kbd "<ESC>") 'mc/keyboard-quit))
so that the
mc/keymap is defined by the file
multiple-cursors-core.el/elc before a new keyboard shortcut is added thereto.
If the solution above does not work you can assign temporarily a custom keybind except ESC in order not to break other commands with the snippet below
(global-set-key (kbd "some keybind") 'mc/keyboard-quit)