Next: @samp
{text}, Previous: @kbd
{keyboard-characters}, Up: Indicating Definitions, Commands, etc. [Contents][Index]
@key
{key-name}Use the @key
command for the conventional name for a key on a
keyboard, as in:
@key{RET}
You can use the @key
command within the argument of an
@kbd
command when the sequence of characters to be typed
includes one or more keys that are described by name.
For example, to produce C-x ESC and M-TAB you would type:
@kbd{C-x @key{ESC}} @kbd{M-@key{TAB}}
Here is a list of the recommended names for keys:
- SPC
Space
- RET
Return
- LFD
Linefeed (however, since most keyboards nowadays do not have a Linefeed key, it might be better to call this character C-j)
- TAB
Tab
- BS
Backspace
- ESC
Escape
- DELETE
Delete
- SHIFT
Shift
- CTRL
Control
- META
Meta
There are subtleties to handling words like ‘meta’ or ‘ctrl’ that are
names of modifier keys. When mentioning a character in which the
modifier key is used, such as Meta-a, use the @kbd
command
alone; do not use the @key
command; but when you are referring
to the modifier key in isolation, use the @key
command. For
example, write ‘@kbd{Meta-a}’ to produce Meta-a and
‘@key{META}’ to produce META.
As a convention in GNU manuals, @key
should not be used in
index entries.