Template:Kbd

From MozillaWiki
Jump to: navigation, search

{{{1}}}

Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

{{kbd}} creates small textboxes in the likeness of computer keys (the abbreviation kbd stands for "keyboard"). It is designed to be used for depicting keyboard shortcuts and other keystrokes, and is suitable for use in e.g. help documents.

Parameter

There is only one parameter, which is unnamed (below called 1).

Custom text

1: Custom key name

This parameter is used for entering the key name. Since it is unnamed, no parameter name needs to be entered.

Usage:

  • {{kbd|key name}}

Examples

Single keys

Case What you type What you see Notes
Letter: a A}} A
Symbol: up arrow ↑}} Use HTML entities for characters
not available on your keyboard
Letter: sharp S ß}} ß

Keystroke combinations

To create keystroke combinations, enter one template call per key, and separate them with a plus sign (or whatever the practice for your locale is).

Case What you type What you see Notes
Two keys Alt}}+{{kbd|P}} Alt+P
Three keys Ctrl}}+{{kbd|Alt}}+{{kbd|Del}} Ctrl+Alt+Del

See also

  • {{keystroke}}: the same basic function, but more versatile.