Currently, if I press C-h c
, then trice press ESC
key on keyboard I get result
ESC ESC ESC (translated from <escape> <escape> <escape>) runs the command keyboard-escape-quit
What the difference between ESC
and <escape>
and how can I use this difference to make more keybindings?
Summary of essential emacs commands In the list below, C- means "control key", M- means "meta key" (escape). For meta commands, press the meta key, then the other key. Thus M-f stands for the keyboard sequence "press meta key", " press f".
The M stands for the Meta key, which you can emulate on most keyboards by pressing the Esc key. For more information on Emacs keystroke naming conventions, see How keystrokes are denoted in Emacs.
Found solution in emacs
mailing list archive:
The escape key usually is linked to the escape char, but the two are different. Under a tty, Emacs receives the exact same byte-sequence from the terminal if you type the escape key or if you type C-[ (both send the escape char).
Under a GUI, on the other hand, Emacs can distinguish the two, so under a GUI, the escape key doesn't send
?\e
(akaESC
for kbd) butescape
(aka<escape>
for kbd) which is usually turned into a?\e
via function-key-map (i.e. only if there's no corresponding binding for the key sequence withescape
).Same thing happens with tab (i.e. TAB (aka
C-i
) vs tab) and return (i.e. RET (akaC-m
) vs return).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With