http://wiki.rootsmagic.com/index.php?title=Template:Key_press/doc&feed=atom&action=historyTemplate:Key press/doc - Revision history2024-03-29T00:32:33ZRevision history for this page on the wikiMediaWiki 1.35.2http://wiki.rootsmagic.com/index.php?title=Template:Key_press/doc&diff=2939&oldid=prevMike: 1 revision imported2021-10-11T19:15:50Z<p>1 revision imported</p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:15, 11 October 2021</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Mikehttp://wiki.rootsmagic.com/index.php?title=Template:Key_press/doc&diff=2938&oldid=prevTemplate>Idell: /* Wikilinks */Cr2021-07-10T09:29:13Z<p><span dir="auto"><span class="autocomment">Wikilinks: </span>Cr</span></p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE END OF THIS PAGE. --><br />
{{Redirect|Template:Key|map key templates|Category:Legend templates}}<br />
{{Lua|Module:Key}}<br />
{{used in system|in [[MediaWiki:Clearyourcache]]}}<br />
__NOTOC__<br />
<br />
This is the {{tl|key press}} 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.<br />
<br />
Example<br />
: {{tc|key press|A}} → {{key press|A}}<br />
As lower-case alphabetic characters a–z do not appear on most keyboards, they should not be used as parameters.<br />
<br />
===Keystroke combinations===<br />
To illustrate keystroke combinations, just use extra parameters:<br />
: {{tc|key press|Alt|P}} → {{key press|Alt|P}}<br />
: {{tc|key press|Ctrl|Alt|Del}} → {{key press|Ctrl|Alt|Del}}<br />
<br />
When you feed several key names to this template, it adds a "+" (or whatever the contents of the optional ''chain'' parameter) with no spaces around. This means it won't line wrap. But when you show key combinations for instance in a table that might cause items to be too wide. Instead manually build the key combination with spaces around the "+" so it can line wrap:<br />
: {{tc|key press|Ctrl}} + {{tlc|key press|Alt}} + {{tlc|key press|Del}} → {{key press|Ctrl}} + {{key press|Alt}} + {{key press|Del}}<br />
: {{tc|key press|Ctrl|Alt|Del|5=chain=&amp;#32;+&amp;#32;}} → {{key press|Ctrl|Alt|Del|chain=&#32;+&#32;}}<br />
<br />
To illustrate sequences where all keys do not need to be pressed simultaneously, the plus signs can be omitted by setting ''chain=''. For example, in most Windows systems in North America and Western Europe, [[Alt code]]s can be used to insert the [[plus-minus sign]] (±) by holding down the {{key press|Alt}} key while typing <code>0177</code> with the [[numeric keypad]]:<br />
: {{tc|key press|Alt|0}}{{tlc|key press|1|7|7|chain{{=}}}} → {{key press|Alt|0}}{{key press|1|7|7|chain=}}<br />
<br />
An example of a use case where more than 5 might be used is explaining usage of a macro (keyboard shortcut) created by a third-party application:<br />
: {{tc|Key press|Ctrl|Alt|Shift|Win|Menu|fn|L}} → {{Key press|Ctrl|Alt|Shift|Win|Menu|fn|L}}<br />
<br />
===Wikilinks===<br />
If there is an article about the key you can [[WP:wikilink|wikilink]] the key's name like any other wiki text. Like this:<br />
* {{tc|key press|&#91;&#91;Alt key|Alt&#93;&#93;}} → {{key press|[[Alt key|Alt]]}}<br />
<br />
If you are wikilinking the keys, please ensure that you are piping to the correct page (e.g. <code><nowiki>[[Alt key|Alt]]</nowiki></code> instead of <code><nowiki>[[Alt]]</nowiki></code>, which leads to a [[WP:Disambiguation page|disambiguation page]]).<br />
<br />
===Wiki markup characters===<br />
Some wiki markup characters, like the [[pipe symbol]], the [[semicolon]] and the [[equals sign]], need to be entered using the {{tlx|!}}, {{tlx|;}} and {{tlx|{{=}}}} templates or as an [[HTML entity]] &amp;#124;, &amp;#59;, &amp;#61; respectively:<br />
* {{tc|key press|{{tc|pipe}}}} → {{key press|{{pipe}}}}<br />
* {{tc|key press|&amp;#124;}} → {{key press|&#124;}}<br />
* {{tc|key press|{{tc|&#59;}}}} → {{key press|{{;}}}}<br />
* {{tc|key press|&amp;#59;}} → {{key press|&#59;}}<br />
* {{tc|key press|{{tc|&#61;}}}} → {{key press|{{=}}}}<br />
* {{tc|key press|&amp;#61;}} → {{key press|&#61;}}<br />
<br />
However, if the characters are marked as wikilinks, they can be entered as such:<br />
* {{tc|key press|<nowiki>[[|]]</nowiki>}} → {{key press|[[|]]}}<br />
* {{tc|key press|<nowiki>[[;]]</nowiki>}} → {{key press|[[;]]}}<br />
* {{tc|key press|<nowiki>[[=]]</nowiki>}} → {{key press|[[=]]}}<br />
<br />
Most markup characters also have aliases:<br />
* {{tc|key press|pipe}} → {{key press|pipe}}<br />
* {{tc|key press|semicolon}} → {{key press|semicolon}}<br />
* {{tc|key press|equals}} → {{key press|equals}}<br />
* {{tc|key press|colon}} → {{key press|colon}}<br />
* {{tc|key press|asterisk}} → {{key press|asterisk}}<br />
* {{tc|key press|hash}} → {{key press|hash}}<br />
<br />
===Key symbols===<br />
Some key names have a fitting [[Unicode]] character. This template automatically adds such "icons" to the following key names among others.<br />
* {{tc|key press|Shift}} → {{key press|Shift}}<br />
* {{tc|key press|Tab}} → {{key press|Tab}}<br />
* {{tc|key press|Enter}} → {{key press|Enter}}<br />
* {{tc|key press|Option}} → {{key press|Option}}<br />
* {{tc|key press|Opt}} → {{key press|Opt}}<br />
* {{tc|key press|Command}} → {{key press|Command}}<br />
* {{tc|key press|Cmd}} → {{key press|Cmd}}<br />
* {{tc|key press|Caps Lock}} → {{key press|Caps Lock}}<br />
* {{tc|key press|Up}} → {{key press|Up}}<br />
* {{tc|key press|Down}} → {{key press|Down}}<br />
* {{tc|key press|Left}} → {{key press|Left}}<br />
* {{tc|key press|Right}} → {{key press|Right}}<br />
[[File:AltGr Win Menu Ctrl key.jpg|thumb|200px|Windows key and Menu key]]<br />
[[File:Ctl wndws alt.jpg|thumb|200px|Old-style Windows key]]<br />
There are no characters for the [[Windows key]] and [[Menu key]]. So this template shows approximate characters for them, namely the {{sc2|SQUARED PLUS}} and {{sc2|STRICTLY EQUIVALENT TO}} from the [[Mathematical Operators]] Unicode block:<br />
* {{tc|key press|Win}} → {{key press|Win}}<br />
* {{tc|key press|Menu}} → {{key press|Menu}}<br />
<br />
====Video games====<br />
Video game controllers often have specialized input labels that do not map easily. The following are mappings for various game consoles and input features.<br />
<br />
=====Directional input=====<br />
The following should only be used when the input sequence uses something other than the primary input or mixes input between directional devices.<br />
* {{tc|key press|l-down}} → {{key press|l-down}}<br />
* {{tc|key press|c-left}} → {{key press|c-left}}<br />
* {{tc|key press|r-up}} → {{key press|r-up}}<br />
<br />
Stick specific diagonals are also supported:<br />
* {{tc|key press|l-nw}} → {{key press|l-nw}}<br />
* {{tc|key press|c-se}} → {{key press|c-se}}<br />
* {{tc|key press|r-ne}} → {{key press|r-ne}}<br />
<br />
=====PlayStation=====<br />
* {{tc|key press|ex}} → {{key press|ex}}<br />
* {{tc|key press|circle}} → {{key press|circle}}<br />
* {{tc|key press|triangle}} → {{key press|triangle}}<br />
* {{tc|key press|square}} → {{key press|square}}<br />
{{clear}}<br />
<br />
===TemplateData===<br />
{{TemplateDataHeader}}<br />
<templatedata><br />
{<br />
"description": "Illustrates keys and keystrokes on a computer keyboard. Keys can include: Ctrl, Alt, Del, Opt, Menu, Left etc. console keys: ex, circle, triangle, square, and left right and center analog sticks: l-down, c-left, r-ne. The names are case insensitive.",<br />
"params": {<br />
"1": {<br />
"label": "First key",<br />
"description": "First key",<br />
"type": "string/line",<br />
"required": true<br />
},<br />
"2": {<br />
"label": "Second key",<br />
"description": "Optional key press in combination as the first.",<br />
"type": "string/line",<br />
"required": false<br />
},<br />
"3": {<br />
"label": "Third key",<br />
"inherits": "2"<br />
},<br />
"4": {<br />
"label": "Fourth key",<br />
"inherits": "2"<br />
},<br />
"5": {<br />
"label": "Fifth key",<br />
"inherits": "2"<br />
},<br />
"6": {<br />
"label": "Sixth key",<br />
"inherits": "2"<br />
},<br />
"7": {<br />
"label": "Seventh key",<br />
"inherits": "2"<br />
},<br />
"8": {<br />
"label": "Eighth key",<br />
"inherits": "2"<br />
},<br />
"9": {<br />
"label": "Ninth key",<br />
"inherits": "2"<br />
},<br />
"10": {<br />
"label": "Tenth key",<br />
"inherits": "2"<br />
},<br />
"chain": {<br />
"label": "Chaining character",<br />
"description": "Character between chained key presses",<br />
"default": "+",<br />
"inherits": "2"<br />
},<br />
"chain first": {<br />
"description": "Character between first and second key to press",<br />
"inherits": "chain"<br />
},<br />
"chain second": {<br />
"description": "Character between second and third key to press",<br />
"inherits": "chain"<br />
},<br />
"chain third": {<br />
"description": "Character between third and fourth key to press",<br />
"inherits": "chain"<br />
},<br />
"chain fourth": {<br />
"description": "Character between fourth and fifth key to press",<br />
"inherits": "chain"<br />
}<br />
}<br />
}<br />
</templatedata><br />
<br />
===See also===<br />
* {{tlx|Key top}} – produces a similar visual effect, but includes more symbols and does not directly support key combinations (e.g. {{key top|Caps Lock}})<br />
* {{tlx|Button}} – produces a similar visual effect but without the semantic markup (e.g. {{Button|sample text}}); more for representing interface elements.<br />
* {{tlx|Playstation key press}} – to simulate gamepad buttons (e.g. {{tlx|Playstation key press|s}})<br />
* {{tlx|Kbd}} – to indicate user input (of any kind) without making it look like keys or buttons<br />
<br />
{{Semantic markup templates}}<br />
<br />
<includeonly>{{Sandbox other||<br />
<!-- CATEGORY LINKS BELOW THIS LINE, PLEASE: --><br />
[[Category:Programming typing-aid templates]]<br />
<!-- [[Category:Graphic templates]] - Don't add this one; this isn't a graphic template, as it's all done in CSS. --><br />
[[Category:Semantic markup templates]]<br />
[[Category:Software templates]]<br />
[[Category:Computer keys|τ]]<br />
<br />
[[nl:Sjabloon:Toets]]<br />
[[sl:Predloga:Keypress]]<br />
}}</includeonly></div>Template>Idell