manpagez: man pages & more
info texinfo
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.1.3 @kbd{keyboard-characters}

Use the @kbd command for characters of input to be typed by users. For example, to refer to the characters M-a, write:


and to refer to the characters M-x shell, write:

@kbd{M-x shell}

By default, the @kbd command produces a different font (slanted typewriter instead of normal typewriter), so users can distinguish the characters that they are supposed to type from those that the computer outputs.

Since the usage of @kbd varies from manual to manual, you can control the font switching with the @kbdinputstyle command. This command has no effect on Info output. Write this command at the beginning of a line with a single word as an argument, one of the following:


Always use the same font for @kbd as @code.


Use the distinguishing font for @kbd only in @example and similar environments.


(the default) Always use the distinguishing font for @kbd.

You can embed another @-command inside the braces of an @kbd command. Here, for example, is the way to describe a command that would be described more verbosely as “press the ‘r’ key and then press the <RETURN> key”:

@kbd{r @key{RET}}

This produces: r <RET>. (The present manual uses the default for @kbdinputstyle.)

You also use the @kbd command if you are spelling out the letters you type; for example:

To give the @code{logout} command,
type the characters @kbd{l o g o u t @key{RET}}.

This produces:

To give the logout command, type the characters l o g o u t <RET>.

(Also, this example shows that you can add spaces for clarity. If you explicitly want to mention a space character as one of the characters of input, write @key{SPC} for it.)

[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on October 2, 2013 using texi2html 5.0.

© 2000-2017
Individual documents may contain additional copyright information.