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.

Many computers running the X Window System also have other equivalents for the 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 or C-h (terminal-dependent)
DEL Delete
Del or Backspace (terminal-dependent)
LFD Line Feed C-j
RET Carriage Return Return, Enter, or C-m
SPC Space Spacebar
TAB Tab Tab


Here are a few examples of how to interpret Emacs keystroke conventions:

Emacs command What you type
C-x C-c
Press and hold Ctrl, then press x, followed by c.
M-x shell
Press and release Esc, then press x. Then type shell and press Enter.
Press and release Esc, then press and hold Ctrl and press p.

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.