imported>RheingoldRiver
Adding default set of pages
 
the mass documenting
 
Line 1: Line 1:
<tabber>
'''<code>Key</code> displays a small controller/keyboard button icon for a given platform and input (e.g. the Xbox "A" button), used in control/instruction sections.'''
|-|Desktop={{:Template:Key/doc/Keyboard}}
__TOC__


|-|Mobile={{:Template:Key/doc/Gesture}}
== Overview ==
This template shows the input glyph for a chosen platform and key — for example the Xbox A button, a PlayStation face button, a Switch button, a keyboard/mouse key, or a mobile gesture. You give it the platform name and the key name; it picks the matching uploaded image (<code>&lt;Platform&gt; &lt;Key&gt;.png</code>) and renders it inline at about 25px tall. It is used in controls documentation such as the per-platform [[Template:Key/doc]] tabs (Xbox, DualSense, Nintendo Switch, etc.).


|-|Xbox={{:Template:Key/doc/Xbox}}
== Parameters ==
{| class="wikitable"
! Parameter !! Required? !! What it does !! Example
|-
| <code>1</code> (first unnamed) || Required (for two-arg form) || The platform. Many aliases are accepted and normalised (see list below). When only one argument is given, behaviour is limited — supply both. || <code>Xbox</code>
|-
| <code>2</code> (second unnamed) || Required || The key/button name. Its first letter is auto-capitalised, so <code>a</code> and <code>A</code> both work. Combined with the platform to find the image. || <code>A</code>
|}


|-|PlayStation={{:Template:Key/doc/DualSense}}
== How to use ==
1. Write <code>{{Key|&lt;platform&gt;|&lt;key&gt;}}</code> — platform first, key second.
2. The platform argument accepts aliases that map to a canonical name used in the image file:
** Desktop: <code>mouse</code>, <code>keyboard</code> → <code>keyboard</code>
** Mobile: <code>gesture</code> → <code>gesture</code>
** Xbox: <code>xbox</code>, <code>xboxseries</code> → <code>Xbox</code>; <code>xbox one</code>/<code>xbone</code>/<code>xbox1</code>/<code>xboxone</code> → <code>xboxone</code>; <code>xbox 360</code>/<code>xb360</code>/<code>xbox360</code>/<code>360</code> → <code>360</code>
** PlayStation: <code>ps</code>/<code>ps5</code>/<code>playstation</code>/<code>ds</code>/<code>dualsense</code> → <code>DualSense</code>; <code>playstation 4</code>/<code>ps4</code> → <code>ps4</code>; <code>playstation 3</code>/<code>ps3</code> → <code>ps3</code>
** Nintendo: <code>ns</code>/<code>switch</code> → <code>Switch</code>; <code>wii</code> → <code>wii</code>
3. The image looked up is <code>&lt;canonical platform&gt; &lt;Key&gt;.png</code> (note the space). For example <code>{{Key|Xbox|A}}</code> uses <code>File:Xbox A.png</code>; <code>{{Key|ps5|Cross}}</code> uses <code>File:DualSense Cross.png</code>.
4. Key names can be multi-word, e.g. <code>{{Key|Xbox|Left Thumbstick}}</code> → <code>File:Xbox Left Thumbstick.png</code>. Diagrams use long key names like <code>Series Controller Diagram</code>.
5. Casing of the key is forgiving (first letter is upper-cased automatically), but the rest must match the file name.


|-|Nintendo Switch={{:Template:Key/doc/Nintendo Switch}}
== Copy this ==
</tabber>
<syntaxhighlight lang="wikitext" style="overflow:auto;">
<noinclude>[[Category:Key template documentation]]</noinclude>
{{Key|platform|key}}
</syntaxhighlight>
 
== Example ==
{{Key|Xbox|A}} {{Key|Xbox|LB}} {{Key|Xbox|Left Thumbstick}}
 
<syntaxhighlight lang="wikitext" style="overflow:auto;">
{{Key|Xbox|A}} {{Key|Xbox|LB}} {{Key|Xbox|Left Thumbstick}}
</syntaxhighlight>
 
== Tips & notes ==
* Always pass '''both''' arguments. The template only sets the image when a second argument is present; a one-argument call resolves to "Undefined" / no image.
* The resolved file name uses a space between platform and key (<code>Xbox A.png</code>), not a hyphen or underscore. The matching image must be uploaded under exactly that name.
* Unrecognised platform aliases normalise to <code>undefined</code>, which then fails to find an image — double-check the alias list above.
* Image sources for each platform are catalogued on the dev wiki (e.g. <code>[[dev:Category:Xbox input images]]</code>), referenced from the platform doc tabs.
* The icon renders inline at <code>x25px</code> with its link disabled, so it sits naturally within a sentence.
* Related: the per-platform documentation subpages [[Template:Key/doc/Keyboard]], [[Template:Key/doc/Gesture]], [[Template:Key/doc/Xbox]], [[Template:Key/doc/DualSense]], [[Template:Key/doc/Nintendo Switch]], and [[Template:Key/doc/PS4]].

Latest revision as of 11:55, 20 June 2026

Key displays a small controller/keyboard button icon for a given platform and input (e.g. the Xbox "A" button), used in control/instruction sections.

Overview

This template shows the input glyph for a chosen platform and key — for example the Xbox A button, a PlayStation face button, a Switch button, a keyboard/mouse key, or a mobile gesture. You give it the platform name and the key name; it picks the matching uploaded image (<Platform> <Key>.png) and renders it inline at about 25px tall. It is used in controls documentation such as the per-platform Template:Key/doc tabs (Xbox, DualSense, Nintendo Switch, etc.).

Parameters

Parameter Required? What it does Example
1 (first unnamed) Required (for two-arg form) The platform. Many aliases are accepted and normalised (see list below). When only one argument is given, behaviour is limited — supply both. Xbox
2 (second unnamed) Required The key/button name. Its first letter is auto-capitalised, so a and A both work. Combined with the platform to find the image. A

How to use

1. Write [[File: <key>.png|x25px|link=]] — platform first, key second. 2. The platform argument accepts aliases that map to a canonical name used in the image file:

    • Desktop: mouse, keyboardkeyboard
    • Mobile: gesturegesture
    • Xbox: xbox, xboxseriesXbox; xbox one/xbone/xbox1/xboxonexboxone; xbox 360/xb360/xbox360/360360
    • PlayStation: ps/ps5/playstation/ds/dualsenseDualSense; playstation 4/ps4ps4; playstation 3/ps3ps3
    • Nintendo: ns/switchSwitch; wiiwii

3. The image looked up is <canonical platform> <Key>.png (note the space). For example File:Xbox A.png uses File:Xbox A.png; File:DualSense Cross.png uses File:DualSense Cross.png. 4. Key names can be multi-word, e.g. File:Xbox Left Thumbstick.pngFile:Xbox Left Thumbstick.png. Diagrams use long key names like Series Controller Diagram. 5. Casing of the key is forgiving (first letter is upper-cased automatically), but the rest must match the file name.

Copy this

{{Key|platform|key}}

Example

File:Xbox A.png File:Xbox LB.png File:Xbox Left Thumbstick.png

{{Key|Xbox|A}} {{Key|Xbox|LB}} {{Key|Xbox|Left Thumbstick}}

Tips & notes

  • Always pass both arguments. The template only sets the image when a second argument is present; a one-argument call resolves to "Undefined" / no image.
  • The resolved file name uses a space between platform and key (Xbox A.png), not a hyphen or underscore. The matching image must be uploaded under exactly that name.
  • Unrecognised platform aliases normalise to undefined, which then fails to find an image — double-check the alias list above.
  • Image sources for each platform are catalogued on the dev wiki (e.g. dev:Category:Xbox input images), referenced from the platform doc tabs.
  • The icon renders inline at x25px with its link disabled, so it sits naturally within a sentence.
  • Related: the per-platform documentation subpages Template:Key/doc/Keyboard, Template:Key/doc/Gesture, Template:Key/doc/Xbox, Template:Key/doc/DualSense, Template:Key/doc/Nintendo Switch, and Template:Key/doc/PS4.