Template:Key

From ATLAS Wiki
Jump to: navigation, search
Template-info.png Documentation

When used, this template displays game controls, supporting both keyboard keys and controller buttons.

Usage

Keyboard

{{keys | key = keyboard key | keyboardvariant = dark or light }}

  • The key parameter is the keyboard key to be pressed.
  • The keyboardvariant parameter is the graphic style and is not required - the template defaults to dark, rendering a white key with black text. Enter dark for dark wikis, or light for light wikis.

Controller

{{keys | console = console type | key = controller button | size = optional size }}

  • The console parameter is used to state which console the key belongs to. The parameter is not case-sensitive. See Template:Key/library for possible values.
  • The button parameter is the button to be pressed, such as "A" or "Cross". Note that this template uses the registered trademark names, i.e. "cross" instead of "X" for Playstation buttons, but the template has alternative spellings and entries included. See Template:Key/library for possible values.
  • The size parameter is optional, and sizes the button image. If this parameter is not entered, the default image size is 50px.

Examples

Keyboard

The keyboardvariant parameter does not usually need to be entered explicitly. A default is generally set during a wiki's spinup. The parameter is used here to illustrate the two available versions.


{{key
| key = caps lock
| keyboardvariant = dark
}}

Or for light wikis:


{{key
| key = caps lock
| keyboardvariant = light
}}

Keyboard keys can be entered in shorthand like this: ⇪ Caps Lock

{{key|caps lock}}

Controller


Controls

{{key
| console = 360
| key = A
| size = 50px
}}
Shorthand

If {{{2}}} is given, the template will assume {{{1}}} to be console and {{{2}}} to be the key/button. Here is the same output as above, but using this shorthand:
Controls

{{Key|360|A|size=50px}}