Template:KeyPress/doc

This is the KeyPress template primarily designed to illustrate keys and keystrokes on a computer keyboard. With additional parameters, a single template can even illustrate a combination of multiple simultaneous keystrokes. A sequence of keystrokes, on the other hand, need to be demonstrated with separate templates.

Example:
 * produces

Keystroke combinations
To illustrate keystroke combinations, just use extra parameters:
 * produces


 * produces

This template currently handles up to 5 key name parameters, which should be more than enough to accommodate for any possible combination of simultaneous keystrokes.

When you feed several key names to this template, it adds a "+" with no spaces around. This means it won't line wrap. But when you show key combinations for instance in a table then that might cause too wide items. Then instead manually build the key combination with spaces around the "+" so it can line wrap. Like this:


 * produces +  +

Wiki characters
Some wiki markup character, like the pipe symbol, the semicolon and the equals sign, need to be entered using the magic word  and the = template:


 * produces


 * produces


 * produces

Key symbols
Some key names have a fitting Unicode character. This template automatically adds such "icons" to the following key names:


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces


 * produces

There are no characters for the Windows key and Menu key. Besides, the Windows logo is trademarked. So this template shows approximate characters for them in the following way:


 * produces


 * produces

Video games
Video game controllers often have specialized input labels that do not map easily. The following are mappings for various game consoles and input features.

Directional input
The following should only be used when the input sequence uses something other than the primary input or mixes input between directional devices.


 * produces
 * produces
 * produces

Stick specific diagonals are also supported:


 * produces
 * produces
 * produces

PlayStation

 * produces
 * produces
 * produces
 * produces

Technical details
This template calls KeyPress/core, which holds the code that otherwise would be repeated several times in KeyPress, thus simplifying the code.