Emacs's Key Notation: What's the difference between "<return>" and "RET"?
What's the difference between emacs "<return>"
and "RET"
key notation?
"<return>"
is the Return key while emacs runs in a graphical user interface.
"RET"
is the Return key while emacs runs in a terminal.
"RET"
is also equivalent to "C-m"
(【Ctrl+m】). (For why, see: Emacs's Key Syntax Explained)
if you define:
(global-set-key (kbd "<return>") 'backward-char)
and run emacs in terminal, your keybinding will have no effect.
you need to use:
(global-set-key (kbd "RET") 'backward-char)
But the problem is, by binding (kbd "RET")
, you are also binding (kbd "C-m")
, regardless you run emacs in terminal or GUI.
What's the difference between emacs "<tab>"
and "TAB"
key notation?
Same situation for "<return>"
vs "RET"
.
Here, "TAB"
is equivalent to "C-i"
.
Also, "ESC"
is the same as "C-["
.
If you have a question, put $5 at patreon and message me.
Or Buy Xah Emacs Tutorial
Or buy a nice keyboard:
Best Keyboards for Emacs