Changes

Jump to: navigation, search

User:Lakrits/sandbox

24,278 bytes added, 12:21, 4 December 2014
.
{{User sandbox}}
<!-- 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:
 
:{{tlc|keystroke|key1&nbsp;|key2&nbsp;|key3&nbsp;|key4&nbsp;|key5&nbsp;|…|key10&nbsp;}}
 
===Required parameter===
====1 (unnamed)====
;<big>Key name</big>
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&nbsp;|key2&nbsp;}}, the result will be {{keystroke|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.
 
;Example
{| border="0"
| {{tlc|keystroke|<nowiki>[[;]]</nowiki>}} || &rarr; || {{keystroke|[[;]]}}
|}
 
===Unicode symbols and wikilinking===
Some keys have an option of being displayed with just text, with a symbol &amp; text, with wikilinked text, or with a symbol &amp; 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.
 
;Examples
{| border="0"
| {{tlc|keystroke|space}} || &rarr; || {{keystroke|space}}
|-
| {{tlc|keystroke|space-uc}} || &rarr; || {{keystroke|space-uc}}
|-
| {{tlc|keystroke|win}} || &rarr; || {{keystroke|win}}
|}
 
;<big>Unicode symbols in the template</big>
{| class="wikitable" style="background-color: white;"
|-
! colspan="2" | <big>Modifier keys</big> !! rowspan="10" | !! colspan="2" | <big>Alphanumeric keys</big> !! rowspan="10" | !! colspan="2" | <big>Lock keys</big>
|-
! Key !! Unicode <br>symbol !! Key !! Unicode <br>symbol !! Key !! Unicode <br>symbol
|-
| Alt || {{center|⎇}} || Backspace || {{center|←}} || Caps Lock || {{center|⇪}}
|-
| Command (Cmd) || {{center|⌘}} || Enter || {{center|↵}} || Number Lock || {{center|⇭}}
|-
| Compose || {{center|⎄}} || Enter (Mac) || {{center|⌤}} || Scroll Lock || {{center|⇳}}
|-
| Control (Ctrl) || {{center|⎈}} || Spacebar || {{center|␣}} || colspan="2" rowspan="5" |
|-
| Meta || {{center|◆}} || Tabulator (Tab) || {{center|↹}}
|-
| Option (Opt) || {{center|⌥}} || colspan="2" rowspan="3" |
|-
| Shift || {{center|⇧}}
|-
| Win || {{center|⊞}}
|-
! colspan="8" |
|-
! colspan="2" | <big>Cursor keys</big> !! rowspan="6" | !! colspan="2" | <big>System command keys</big> !! rowspan="6" | !! colspan="2" | <big>Miscellaneous</big>
|-
! Key !! Unicode <br>symbol !! Key !! Unicode <br>symbol !! Key !! Unicode <br>symbol
|-
| 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.
 
;Example
{| border="0"
| {{tlc|keystroke|<nowiki>[[space]]</nowiki>}} || &rarr; || {{keystroke|[[space]]}}
|}
 
;<big>Both symbol and wikilink</big>
You can of course combine the two features described above.
 
;Examples
{| border="0"
| {{tlc|keystroke|<nowiki>[[space-uc]]</nowiki>}} || &rarr; || {{keystroke|[[space-uc]]}}
|-
| {{tlc|keystroke|<nowiki>[[win]]</nowiki>}} || &rarr; || {{keystroke|[[win]]}}
|}
 
===Available values===
====Alphanumeric keys====
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Group !! rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Symbol + text !! Symbol + link
|-
| rowspan="3" | Letters || A–Z || {{center|<tt>A–Z</tt>}} || || || ||
|-
| a–z || {{center|<tt>a–z</tt>}} || || || || Avoid lowercase, if possible
|-
| Other letters || {{center|<tt>(as above)</tt>}} || || || ||
|-
| rowspan="2" | Digits || 0–9 || {{center|<tt>0–9</tt>}} || || || ||
|-
| Other digits || {{center|<tt>(as above)</tt>}} || || || ||
|-
| rowspan="3" | Punctuation || Colon || {{center|<tt>colon</tt>}} || {{center|<tt><nowiki>[[colon]]</nowiki></tt>}} || || ||
|-
| Semicolon || {{center|<tt>semicolon</tt>}} || {{center|<tt><nowiki>[[semicolon]]</nowiki></tt>}} || || ||
|-
| Spacebar || {{center|<tt>space</tt>}} || {{center|<tt><nowiki>[[space]]</nowiki></tt>}} || {{center|<tt>space-uc</tt>}} || {{center|<tt><nowiki>[[space-uc]]</nowiki></tt>}} ||
|}
 
====Cursor keys====
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Group !! colspan="2" rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Symbol + text !! Symbol + link
|-
| rowspan="4" | Deletion || colspan="2" | Backspace || || || {{center|<tt>backspace</tt>}} || {{center|<tt><nowiki>[[backspace]]</nowiki></tt>}} ||
|-
| colspan="2" rowspan="2" | Delete || {{center|<tt>del</tt>}} || {{center|<tt><nowiki>[[del]]</nowiki></tt>}} || || || Short name
|-
| {{center|<tt>delete</tt>}} || {{center|<tt><nowiki>[[delete]]</nowiki></tt>}} || || || Long name
|-
| colspan="2" | Insert || {{center|<tt>insert</tt>}} || {{center|<tt><nowiki>[[insert]]</nowiki></tt>}} || || ||
|-
| rowspan="3" | Locking || colspan="2" | Caps Lock || {{center|<tt>caps</tt>}} || {{center|<tt><nowiki>[[caps]]</nowiki></tt>}} || {{center|<tt>caps-uc</tt>}} || {{center|<tt><nowiki>[[caps-uc]]</nowiki></tt>}} ||
|-
| colspan="2" | Num Lock || {{center|<tt>num</tt>}} || {{center|<tt><nowiki>[[num]]</nowiki></tt>}} || {{center|<tt>num-uc</tt>}} || {{center|<tt><nowiki>[[num-uc]]</nowiki></tt>}} ||
|-
| colspan="2" | Scroll Lock || {{center|<tt>scroll</tt>}} || {{center|<tt><nowiki>[[scroll]]</nowiki></tt>}} || {{center|<tt>scroll-uc</tt>}} || {{center|<tt><nowiki>[[scroll-uc]]</nowiki></tt>}} ||
|-
| rowspan="10" | Navigation || rowspan="4" | Arrows || Down || || || {{center|<tt>down</tt>}} || {{center|<tt><nowiki>[[down]]</nowiki></tt>}} || No text
|-
| Left || || || {{center|<tt>left</tt>}} || {{center|<tt><nowiki>[[left]]</nowiki></tt>}} || No text
|-
| Right || || || {{center|<tt>right</tt>}} || {{center|<tt><nowiki>[[right]]</nowiki></tt>}} || No text
|-
| Up || || || {{center|<tt>up</tt>}} || {{center|<tt><nowiki>[[up]]</nowiki></tt>}} || No text
|-
| colspan="2" | End || {{center|<tt>end</tt>}} || {{center|<tt><nowiki>[[end]]</nowiki></tt>}} || || ||
|-
| colspan="2" | Home || {{center|<tt>home</tt>}} || {{center|<tt><nowiki>[[home]]</nowiki></tt>}} || || ||
|-
| colspan="2" | Page Down || {{center|<tt>pgdn</tt>}} || {{center|<tt><nowiki>[[pgdn]]</nowiki></tt>}} || || ||
|-
| colspan="2" | Page Up || {{center|<tt>pgup</tt>}} || {{center|<tt><nowiki>[[pgup]]</nowiki></tt>}} || || ||
|-
| colspan="2" rowspan="2" | Tabulator || || || {{center|<tt>tab</tt>}} || {{center|<tt><nowiki>[[tab]]</nowiki></tt>}} || Short name
|-
| || || {{center|<tt>tabulator</tt>}} || {{center|<tt><nowiki>[[tabulator]]</nowiki></tt>}} || Long name
|}
 
====Modifier keys and letters====
;<big>Modifier keys</big>
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Text + icon !! Link + icon
|-
| Alt || {{center|<tt>alt</tt>}} || {{center|<tt><nowiki>[[alt]]</nowiki></tt>}} || {{center|<tt>alt-uc</tt>}} || {{center|<tt><nowiki>[[alt-uc]]</nowiki></tt>}} ||
|-
| Alt Gr || {{center|<tt>altgr</tt>}} || {{center|<tt><nowiki>[[altgr]]</nowiki></tt>}} || || ||
|-
| rowspan="2" | Command <br>(Cmd) || || || {{center|<tt>command</tt>}} || {{center|<tt><nowiki>[[command]]</nowiki></tt>}} || Long name
|-
| || || {{center|<tt>cmd</tt>}} || {{center|<tt><nowiki>[[cmd]]</nowiki></tt>}} || Short name
|-
| Compose || {{center|<tt>compose</tt>}} || {{center|<tt><nowiki>[[compose]]</nowiki></tt>}} || {{center|<tt>compose-uc</tt>}} || {{center|<tt><nowiki>[[compose-uc]]</nowiki></tt>}} ||
|-
| rowspan="2" | Control <br>(Ctrl) || {{center|<tt>control</tt>}} || {{center|<tt><nowiki>[[control]]</nowiki></tt>}} || {{center|<tt>control-uc</tt>}} || {{center|<tt><nowiki>[[control-uc]]</nowiki></tt>}} || Long name
|-
| {{center|<tt>ctrl</tt>}} || {{center|<tt><nowiki>[[ctrl]]</nowiki></tt>}} || {{center|<tt>ctrl-uc</tt>}} || {{center|<tt><nowiki>[[ctrl-uc]]</nowiki></tt>}} || Short name
|-
| rowspan="2" | Enter || || || {{center|<tt>enter</tt>}} || {{center|<tt><nowiki>[[enter]]</nowiki></tt>}} ||
|-
| || || {{center|<tt>entermac</tt>}} || {{center|<tt><nowiki>[[entermac]]</nowiki></tt>}} || Some Mac keyboards
|-
| Fn || {{center|<tt>fn</tt>}} || {{center|<tt><nowiki>[[fn]]</nowiki></tt>}} || || ||
|-
| Meta || {{center|<tt>meta</tt>}} || {{center|<tt><nowiki>[[meta]]</nowiki></tt>}} || {{center|<tt>meta-uc</tt>}} || {{center|<tt><nowiki>[[meta-uc]]</nowiki></tt>}} ||
|-
| rowspan="2" | Option <br>(Opt) || || || {{center|<tt>option</tt>}} || {{center|<tt><nowiki>[[option]]</nowiki></tt>}} || Long name
|-
| || || {{center|<tt>opt</tt>}} || {{center|<tt><nowiki>[[opt]]</nowiki></tt>}} || Short name
|-
| Shift || || || {{center|<tt>shift</tt>}} || {{center|<tt><nowiki>[[shift]]</nowiki></tt>}} ||
|-
| 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"
| {{keystroke|^|E}} || &rarr; || ê
|-
| {{keystroke|^|shift|E}} || &rarr; || Ê
|}
 
If you want to type only the diacritic, you press its key and then press the spacebar.
 
;Example
{| border="0"
| {{keystroke|^|space-uc}} || &rarr; || ^
|}
 
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].
 
;Examples
{| border="0"
| <code>&amp;#169;</code> || &rarr; || &#169;
|-
| {{keystroke|alt|0}}{{keystroke|1}}{{keystroke|6}}{{keystroke|9}} (unicode value) || &rarr; || &#169; ||
|-
| {{keystroke|alt|Num+}}{{keystroke|0}}{{keystroke|0}}{{keystroke|A}}{{keystroke|9}} (hexadecimal unicode value) || &rarr; || &#169; ||
|}
 
'''NB!''' Alt codes can usually only be entered via the numeric keypad, i.e. not by using the row of digits above the letter keys.
 
====System command keys====
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Text + icon !! Link + icon
|-
| 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
|}
 
====Language input keys====
;<big>Japanese</big>
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Text + icon !! Link + icon
|-
| rowspan="2" | Conversion <br>(henkan) || {{center|<tt>henkan</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>conversion</tt>}} || || ||
|-
| rowspan="2" | Non-Conversion <br>(muhenkan) || {{center|<tt>muhenkan</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>nonconversion</tt>}} || || ||
|-
| rowspan="2" | Half-width <br>(hankaku) || {{center|<tt>hankaku</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>half</tt>}} || || ||
|-
| rowspan="2" | Full-width <br>(zenkaku) || {{center|<tt>zenkaku</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>full</tt>}} || || ||
|-
| Kanji || {{center|<tt>kanji</tt>}} || || || ||
|-
| rowspan="2" | Half-width/Full-width <br>(hankaku/zenkaku) || {{center|<tt>haze</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>halffull</tt>}} || || ||
|-
| Half-width/Full-width/Kanji <br>(hankaku/zenkaku/kanji) || {{center|<tt>hazeka</tt>}} || || || ||
|-
| Katakana || {{center|<tt>kata</tt>}} || || || ||
|-
| Hiragana || {{center|<tt>hira</tt>}} || || || ||
|-
| Rōmaji || {{center|<tt>roma</tt>}} || || || ||
|-
| Katakana/hiragana || {{center|<tt>kahi</tt>}} || || || ||
|-
| Katakana/hiragana/rōmaji || {{center|<tt>kahiro</tt>}} || || || ||
|-
| rowspan="2" | Alphanumeric <br>(eisū) || {{center|<tt>eisu</tt>}} || || || || rowspan="2" | Same output
|-
| {{center|<tt>alphanumeric</tt>}} || || ||
|}
 
;<big>Korean</big>
{| class="wikitable" style="background-color: white;"
|-
! rowspan="2" | Key !! colspan="4" | Value !! rowspan="2" | Notes
|-
! Text !! Link !! Text + icon !! Link + icon
|-
| Hangul || {{center|<tt>hangul</tt>}} || || || ||
|-
| Yeong || {{center|<tt>yeong</tt>}} || || || ||
|-
| rowspan="2" | Hangul/yeong || {{center|<tt>ha/ye</tt>}} || || || || With forward slash
|-
| {{center|<tt>haye</tt>}} || || || || Without forward slash
|-
| rowspan="2" | Hanja || {{center|<tt>hanja</tt>}} || || || || Korean text
|-
| {{center|<tt>hanjach</tt>}} || || || || Chinese text
|-
| rowspan="3" | Won || || || {{center|<tt>wonsign</tt>}} || || Only the symbol, no text
|-
| || || {{center|<tt>won</tt>}} || || English text
|-
| || || {{center|<tt>wonko</tt>}} || || Korean text
|}
 
====Markup character substitutes for this template====
{| class="wikitable" style="background-color: white;"
|-
! colspan="2" | Character !! colspan="3" | Code
|-
! Name !! Char !! MozillaWiki <br>template !! HTML <br>entity !! Template <br>alias
|-
| Asterisk || {{center|<nowiki>*</nowiki>}} || || <tt>&amp;#42;</tt> || <tt>asterisk</tt>
|-
| Colon || {{center|<nowiki>:</nowiki>}} || || <tt>&amp;#58;</tt> || <tt>colon</tt>
|-
| Equals sign || {{center|<nowiki>=</nowiki>}} || {{center|{{tlf|&#61;}}}} || <tt>&amp;#61;</tt> || <tt>equals</tt>
|-
| Number sign || {{center|<nowiki>#</nowiki>}} || || <tt>&amp;#35;</tt> || <tt>hash</tt>
|-
| Pipe symbol || {{center|<nowiki>|</nowiki>}} || {{center|{{tlf|&#124;}}}} || <tt>&amp;#124;</tt> || <tt>pipe</tt>
|-
| Semicolon || {{center|<nowiki>;</nowiki>}} || {{center|{{tlf|&#59;}}}} || <tt>&amp;#59;</tt> || <tt>semicolon</tt>
|}
 
==Examples==
===Correct use===
====Single keys====
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| Letter ''a'' || {{tlc|keystroke|A}} || {{keystroke|A}} || Use the same case as your keyboard …
|-
| Letter ''A'' || {{tlc|keystroke|shift|A}} || {{keystroke|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|Ä}} || {{keystroke|Ä}} || Direct input (e.g. on a Swedish keyboard)
|-
| {{keystroke|¨|shift|A}}, then wrap the template <br>around the ''Ä'' &rarr; {{tlc|keystroke|Ä}} || {{keystroke|Ä}} || Using the umlaut letter modifier
|-
| {{tlc|keystroke|&amp;Auml;}} || {{keystroke|&Auml;}} || Using the HTML entity
|-
| Symbol &uarr; || {{tlc|keystroke|up}} || {{keystroke|up}} ||
|-
| Symbol ₩ + korean text || {{tlc|keystroke|wonko}} || {{keystroke|wonko}} ||
|-
| Key name, long || {{tlc|keystroke|option}} || {{keystroke|option}} ||
|-
| Key name, short || {{tlc|keystroke|opt}} || {{keystroke|opt}} ||
|}
 
====Keystroke combinations====
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| Two keys || {{tlc|keystroke|alt|P}} || {{keystroke|alt|P}} ||
|-
| Three keys || {{tlc|keystroke|ctrl|alt|del}} || {{keystroke|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>&amp;#32;</code>.
 
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| One by one || {{tlc|keystroke|ctrl}} + {{tlc|keystroke|alt}} + {{tlc|keystroke|del}} || {{keystroke|ctrl}} + {{keystroke|alt}} + {{keystroke|del}} ||
|-
| Change ''chain'' || {{tlc|keystroke|ctrl|alt|del|5=chain=&amp;#32;+&amp;#32;}} || {{keystroke|ctrl|alt|del|chain=&#32;+&#32;}} || For advanced users
|}
 
;<big>Alt codes</big>
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.
 
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| First part || {{tlc|keystroke|alt|0}} || {{keystroke|alt|0}} || Provides the plus sign
|-
| rowspan="3" | Parts 2-4 || {{tlc|keystroke|1}} || {{keystroke|1}} ||
|-
| {{tlc|keystroke|7}} || {{keystroke|7}} ||
|-
| {{tlc|keystroke|7}} || {{keystroke|7}} ||
|-
| Resulting Alt code || {{tlc|keystroke|alt|0}}{{tlc|keystroke|1}}{{tlc|keystroke|7}}{{tlc|keystroke|7}} || {{keystroke|alt|0}}{{keystroke|1}}{{keystroke|7}}{{keystroke|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.
 
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| Hankaku/zenkaku || {{tlc|keystroke|haze}} || {{keystroke|haze}} ||
|-
| Hankaku/zenkaku/kanji || {{tlc|keystroke|hazeka}} || {{keystroke|hazeka}} ||
|-
| Katakana/hiragana || {{tlc|keystroke|kahi}} || {{keystroke|kahi}} ||
|-
| Katakana/hiragana/rōmaji || {{tlc|keystroke|kahiro}} || {{keystroke|kahiro}} ||
|}
 
====Using wikilinks====
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| Long name || <code><nowiki>{{keystroke|[[control]]}}</nowiki></code> || {{keystroke|[[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> || {{keystroke|[[ctrl]]}}
|-
| Just text || <code><nowiki>{{keystroke|[[scroll]]}}</nowiki></code> || {{keystroke|[[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> || {{keystroke|[[scroll-uc]]}}
|}
 
===Incorrect use===
====Wikilinking non-linked keys====
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see !! Notes
|-
| Any non-linked key || <code><nowiki>{{keystroke|[[A]]}}</nowiki></code> || {{keystroke|[[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> || {{keystroke|[http://en.wikipedia.org/wiki/A A]}} || Extenal links will be fitted with the symbol <br>used by MediaWiki for such links
|}
 
====Too many key names====
{| class="wikitable" style="background-color: white;"
|-
! Case !! What you type !! What you see
|-
| 10 key names || <code><nowiki>{{User:Lakrits/templatesandboxkeystroke|1|2|3|4|5|6|7|8|9|10}}</nowiki></code> || {{User:Lakrits/templatesandboxkeystroke|1|2|3|4|5|6|7|8|9|10}}
|-
| &ge; 11 key names || <code><nowiki>{{User:Lakrits/templatesandboxkeystroke|1|2|3|4|5|6|7|8|9|10|11}}</nowiki></code> || {{User:Lakrits/templatesandboxkeystroke|1|2|3|4|5|6|7|8|9|10|11}}
|}
<!--
==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.
 
* {{tlc|keystroke|l-down}}&#09;&rarr;&#09;{{keystroke|l-down}}
* {{tlc|keystroke|c-left}}&#09;&rarr;&#09;{{keystroke|c-left}}
* {{tlc|keystroke|r-up}}&#09;&rarr;&#09;{{keystroke|r-up}}
 
Stick specific diagonals are also supported:
 
* {{tlc|keystroke|l-nw}}&#09;&rarr;&#09;{{keystroke|l-nw}}
* {{tlc|keystroke|c-se}}&#09;&rarr;&#09;{{keystroke|c-se}}
* {{tlc|keystroke|r-ne}}&#09;&rarr;&#09;{{keystroke|r-ne}}
 
===PlayStation===
* {{tlc|keystroke|ex}}&#09;&rarr;&#09;{{keystroke|ex}}
* {{tlc|keystroke|circle}}&#09;&rarr;&#09;{{keystroke|circle}}
* {{tlc|keystroke|triangle}}&#09;&rarr;&#09;{{keystroke|triangle}}
* {{tlc|keystroke|square}}&#09;&rarr;&#09;{{keystroke|square}}
-->
 
==Technical details==
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! -->
[[Category:User sandboxes]]
3,860
edits

Navigation menu