Attempting to bind M-ESC M-ESC in the global map to a command:
(global-set-key (kbd "M-ESC M-ESC") #'my-command)
results in the following:
Debugger entered--Lisp error: (error "Key sequence M-ESC M-ESC starts with non-prefix key M-ESC ESC")
I supposed this is due to meta-prefix-char being ESC by default, so M-<char> gets translated into ESC-<char>. Therefore, M-ESC M-ESC is ESC ESC ESC ESC, and ESC ESC ESC is already bound to keyboard-escape-quit.
Is there a safe way to separate the Meta and ESC keys so a binding like M-ESC M-ESC is possible? If so, how?
(global-set-key (kbd "M-ESC M-ESC") #'my-command)– Tianxiang Xiong Feb 24 '17 at 23:32(kbd "ESC ESC ESC ESC"), which tells you thatESC ESC ESCis not a prefix key. It's not a prefix key because it is not bound to a keymap. See (elisp) Prefix Keys. – Drew Feb 24 '17 at 23:42