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,keyboard→keyboard - Mobile:
gesture→gesture - Xbox:
xbox,xboxseries→Xbox;xbox one/xbone/xbox1/xboxone→xboxone;xbox 360/xb360/xbox360/360→360 - PlayStation:
ps/ps5/playstation/ds/dualsense→DualSense;playstation 4/ps4→ps4;playstation 3/ps3→ps3 - Nintendo:
ns/switch→Switch;wii→wii
- Desktop:
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.png → File: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
x25pxwith 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.