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?
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)
I have solved the problem by changing
(define-key mc/keymap (kbd "<escape>") 'mc/keyboard-quit))