How keystrokes are denoted in Emacs
Emacs keystroke conventions are very different from the ones used by many other applications and sources of computing information. They also differ from the standards used in the great majority of Knowledge Base documents. However, because Emacs (and all of its documents) adheres rigorously to its own standard, Knowledge Base documents about Emacs observe the Emacs standard.
The Ctrl key
Emacs uses the C-
prefix to denote holding
down Ctrl
while pressing another key. For
example, holding down Ctrl
and pressing
x
is denoted as
Ctrl-x
in the rest of the Knowledge Base,
but as C-x
in Knowledge Base documents
about Emacs.
The Meta key
Because of Emacs' origin on Symbolics Lisp computers, it makes heavy
use of a Meta
key, denoted with the M-
prefix. This key does not actually exist on most keyboards. In
almost all configurations, however, pressing Esc
once
and releasing it is equivalent to holding down the Meta
key. For example, to enter M-x
, you would press
Esc
and release it, then press
x
.
A few obscure Emacs commands have an M-C-
prefix. To handle these commands on most terminals, press and
release Esc
, then hold down
Ctrl
while pressing the final key in the
command.
Meta
key. On some Linux
systems, the Alt
key may function as the
Meta
key. On most Sun keyboards, the diamond key
functions as the Meta
key.
Other common keys
Emacs also uses two- or three-letter abbreviations for many common keystrokes, as shown below:
Emacs Meaning Keystroke BS Backspace Backspace
orC-h
(terminal-dependent)DEL Delete Del
orBackspace
(terminal-dependent)LFD Line Feed C-j
RET Carriage Return Return
,Enter
, orC-m
SPC Space Spacebar TAB Tab Tab
Examples
Here are a few examples of how to interpret Emacs keystroke conventions:
Emacs command What you type C-x C-c
Press and holdCtrl
, then pressx
, followed byc
.M-x shell
Press and releaseEsc
, then pressx
. Then typeshell
and pressEnter
.M-C-p
Press and releaseEsc
, then press and holdCtrl
and pressp
.
At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.
Related documents
This is document aghb in the Knowledge Base.
Last modified on 2019-06-18 14:44:04.