<!-- Edit below this line DO NOT REMOVE this comment or the content above! -->
The {{tl|keystroke}} template is designed to illustrate keys and keystrokes on a computer keyboard, and is a slight modification of the template [[Wikipedia:Template:Key press|Key press]] in Wikipedia (en). It is especially useful when creating help pages or documentation.
{{tlf|keystroke}} works similar to {{tl|kbd}}, but have some additional options:
* Multiple key name input, giving one template call for up to ten keys in a single combination.
* Unicode symbols for keys that always or at least sometimes lack textual identification, for different OSs.
* Wikilinking to the articles of the keys in Wikipedia (en).
* Japanese and Korean language input keys.
__TOC__
==Parameters==
There is 1 required parameter, and 9 optional ones, all unnamed. The syntax for {{tlf|keystroke}} is:
Entering at least one parameter is required for the template to work.
;Usage
:{{tlc|keystroke|1}}
===Optional parameters===
====2–10 (unnamed)====
;<big>Additional key names</big>
To create a keystroke combination, use parameters 2 through 10. The displayed keys will be separated by plus signs. For example, if you enter {{tlc|keystroke|key1 |key2 }}, the result will be {{User:Lakrits/templatesandbox|key1|key2}}.
The template can take up to 10 key name parameters to display keystroke combinations. If you enter 11 or more key names, it will display an error message.
;Usage
:{{tlc|keystroke|1|2|3|4|5|…|10}}
===Wiki markup characters===
Some wiki markup characters, like the pipe symbol ({{!}}), the semicolon ({{;}}) and the equals sign ({{=}}), need to be entered using templates, HTML entities, or the character aliases that have been created for this template (see the table under ''[[#Markup character substitutes for this template|Available values]]'' below). It's recommended to use the aliases in order to make the wikicode easier to read.
However, if the characters are marked as wikilinks, they can be entered as such.
Some keys have an option of being displayed with just text, with a symbol & text, with wikilinked text, or with a symbol & wikilinked text.
====Unicode symbols====
For keys that can be optionally fitted with a symbol, the symbol is inserted by appending "<tt>-uc</tt>" to the end of the value string.
Keys that more often than not have a symbol instead of text, e.g. the Windows key (Win), will always show with both the symbol and text. And keys such as arrow keys, punctuation characters, etc. only show the symbol. There are no characters for the Windows key (due to copyrights) and the Menu key. Instead, this template shows approximate characters for them.
| Up || {{center|↑}} || Escape (Esc) || {{center|⎋}} || Korean Won || {{center|₩}}
|-
| Down || {{center|↓}} || Menu || {{center|≣}} || colspan="2" rowspan="3" |
|-
| Left || {{center|←}} || Print Screen || {{center|⎙}}
|-
| Right || {{center|→}} || colspan="2" |
|}
====Wikilinks====
Some keys can be wikilinked to make them link to the character's/key's English Wikipedia article. That is acheived by enclosing the value string in double brackets, i.e. by wikilinking them.
| rowspan="2" | Windows <br>(Win) || || || {{center|<tt>windows</tt>}} || {center|<tt><nowiki>[[windows]]</nowiki></tt>}} || Long name
|-
| || || {{center|<tt>win</tt>}} || {center|<tt><nowiki>[[win]]</nowiki></tt>}} || Short name
|}
;<big>Modifier letters (dead keys)</big>
Modifier letters, or [[Wikipedia:Dead keys|dead keys]], are the keys on your keyboard, that are used to combine, for example, diacritic marks (umlaut, accents, circumflex, etc.) with matching letters. When such a key is pressed, nothing seems to happen, hence the term "dead key". Diacritics are used in many languages, and most localized keyboard layouts have a set of the commonmost ones for the locale and the nearby regions, together with special, precomposed letters.
Producing a diacritic letter is done by first pressing the letter modifier with the diacritic you want, and then the letter onto which the diacritic should be inserted.
;Examples
{| border="0"
| {{User:Lakrits/templatesandbox|^|E}} || → || ê
|-
| {{User:Lakrits/templatesandbox|^|shift|E}} || → || Ê
|}
If you want to type only the diacritic, you press its key and then press the spacebar.
Characters, letters or diacritic marks that aren't featured on your keyboard has to be entered using HTML entities or, if you have a numeric keypad, [http://www.fileformat.info/tip/microsoft/enter_unicode.htm Alt codes].
| Break || {{center|<tt>break</tt>}} || {{center|<tt><nowiki>[[break]]</nowiki></tt>}} || || || Also called ''Pause'' (see below)
|-
| rowspan="2" | Escape <br>(Esc) || {{center|<tt>escape</tt>}} || {{center|<tt><nowiki>[[escape]]</nowiki></tt>}} || {{center|<tt>escape-uc</tt>}} || {{center|<tt><nowiki>[[escape-uc]]</nowiki></tt>}} || Long name
|-
| {{center|<tt>esc</tt>}} || {{center|<tt><nowiki>[[esc]]</nowiki></tt>}} || {{center|<tt>esc-uc</tt>}} || {{center|<tt><nowiki>[[esc-uc]]</nowiki></tt>}} || Short name
|-
| Menu || || || {{center|<tt>menu</tt>}} || {{center|<tt><nowiki>[[menu]]</nowiki></tt>}} ||
|-
| Pause || {{center|<tt>pause</tt>}} || {{center|<tt><nowiki>[[pause]]</nowiki></tt>}} || || || Also called ''Break'' (see above)
|-
| rowspan="2" | Print screen <br>(Prt Sc) || {{center|<tt>printscreen</tt>}} || {{center|<tt><nowiki>[[printscreen]]</nowiki></tt>}} || {{center|<tt>printscreen-uc</tt>}} || {{center|<tt><nowiki>[[printscreen-uc]]</nowiki></tt>}} || Long name
|-
| {{center|<tt>prtsc</tt>}} || {{center|<tt><nowiki>[[prtsc]]</nowiki></tt>}} || {{center|<tt>prtsc-uc</tt>}} || {{center|<tt><nowiki>[[prtsc-uc]]</nowiki></tt>}} || Short name
|-
| rowspan="2" | System Request <br>(SysRq) || {{center|<tt>systemrequest</tt>}} || {{center|<tt><nowiki>[[systemrequest]]</nowiki></tt>}} || || || Long name
|-
| {{center|<tt>sysrq</tt>}} || {{center|<tt><nowiki>[[sysrq]]</nowiki></tt>}} || || || Short name
| Letter ''a'' || {{tlc|keystroke|A}} || {{User:Lakrits/templatesandbox|A}} || Use the same case as your keyboard …
|-
| Letter ''A'' || {{tlc|keystroke|shift|A}} || {{User:Lakrits/templatesandbox|shift|A}} || … that's why uppercase letters (when the letter case is important) <br>should be combined with the appropriate modifier key
|-
| rowspan="3" | Letter ''ä'' || {{tlc|keystroke|Ä}} || {{User:Lakrits/templatesandbox|Ä}} || Direct input (e.g. on a Swedish keyboard)
|-
| {{User:Lakrits/templatesandbox|¨|shift|A}}, then wrap the template <br>around the ''Ä'' → {{tlc|keystroke|Ä}} || {{User:Lakrits/templatesandbox|Ä}} || Using the umlaut letter modifier
|-
| {{tlc|keystroke|&Auml;}} || {{User:Lakrits/templatesandbox|Ä}} || Using the HTML entity
|-
| Symbol ↑ || {{tlc|keystroke|up}} || {{User:Lakrits/templatesandbox|up}} ||
|-
| Symbol ₩ + korean text || {{tlc|keystroke|wonko}} || {{User:Lakrits/templatesandbox|wonko}} ||
|-
| Key name, long || {{tlc|keystroke|option}} || {{User:Lakrits/templatesandbox|option}} ||
|-
| Key name, short || {{tlc|keystroke|opt}} || {{User:Lakrits/templatesandbox|opt}} ||
| Two keys || {{tlc|keystroke|alt|P}} || {{User:Lakrits/templatesandbox|alt|P}} ||
|-
| Three keys || {{tlc|keystroke|ctrl|alt|del}} || {{User:Lakrits/templatesandbox|ctrl|alt|del}} ||
|}
;<big>Line wrapping</big>
When you feed several key names to this template, it adds a "+" with no spaces around. This means it won't line wrap. If you need the combinations to line wrap, e.g. in tables, build them one by one with spaces around the "+", or manipulate the ''chain'' template key, so they can line wrap. To insert blank characters, you have to use HTML entities; e.g. the standard space character is <code>&#32;</code>.
To illustrate Windows Alt codes, you might want to use separate templates with no intervening punctuation or space. Do that by combining the <tt>Alt</tt> with the first character (often <tt>0</tt>) in the first template, and then creating separate templates for the last digits.
| Resulting Alt code || {{tlc|keystroke|alt|0}}{{tlc|keystroke|1}}{{tlc|keystroke|7}}{{tlc|keystroke|7}} || {{User:Lakrits/templatesandbox|alt|0}}{{User:Lakrits/templatesandbox|1}}{{User:Lakrits/templatesandbox|7}}{{User:Lakrits/templatesandbox|7}} ||
|}
====Japanese combined language input keys====
Some of the Japanese language input keys combine several functions. In this template, they are fitted next to each other, making these keys wider than usual.
| Long name || <code><nowiki>{{keystroke|[[control]]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[[control]]}} || rowspan="2" | The choice of name length doesn't affect <br>the link, it points to the same target
|-
| Short name || <code><nowiki>{{keystroke|[[ctrl]]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[[ctrl]]}}
|-
| Just text || <code><nowiki>{{keystroke|[[scroll]]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[[scroll]]}} || rowspan="2" | For keys with an option to show the symbol <br>or not, see ''[[#Available values|Available values]]'' above
|-
| With symbol || <code><nowiki>{{keystroke|[[scroll-uc]]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[[scroll-uc]]}}
| Any non-linked key || <code><nowiki>{{keystroke|[[A]]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[[A]]}} || Keys that aren't fitted with links in <br>{{tlf|keystroke/core}} will link to a page with <br>that name inside MozillaWiki, if it exists
|-
| External links || <code><nowiki>{{keystroke|[http://en.wikipedia.org/wiki/A A]}}</nowiki></code> || {{User:Lakrits/templatesandbox|[http://en.wikipedia.org/wiki/A A]}} || Extenal links will be fitted with the symbol <br>used by MediaWiki for such links
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.
This template calls {{tl|keystroke/core}}, which holds the code that otherwise would be repeated several times in {{tlf|keystroke}}, thus simplifying the code.
==See also==
* {{tl|kbd}} – Produces a different visual effect, without unicode symbols
<!-- Categories for this sandbox. DO NOT REMOVE! -->