Next: , Previous: , Up: Indicating   [Contents][Index]


7.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:

@kbd{M-a}

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:

code

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

example

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

distinct

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

You can embed another @-command inside the braces of a @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.)


Next: , Previous: , Up: Indicating   [Contents][Index]