In Emacs, how are keystrokes denoted?
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.
Note: 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 BackspaceorC-h(terminal-dependent)DEL Delete DelorBackspace(terminal-dependent)LFD Line Feed C-jRET Carriage Return Return,Enter, orC-mSPC 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-cPress and hold Ctrl, then pressx, followed byc.M-x shellPress and release Esc, then pressx. Then typeshelland pressEnter.M-C-pPress and release Esc, then press and holdCtrland pressp.
At Indiana University, to get support for personal or departmental Linux or Unix systems, see At IU, how do I get support for Linux or Unix?
Also see:
- For Emacs, where can I get documentation?
- For Emacs, how do I get online help?
- GNU Emacs Quick Reference Guide
- Where can I find help with Emacs?
- In Emacs, what does "M-x command" mean?
- In Emacs, what should I do if I don't have a Meta key?
Last modified on August 22, 2008.






