Template:Key: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>{{#if: {{#var:keyboard}} |[[Controls|<!--
<includeonly>{{#vardefine:console|{{#if:{{{console|}}}|{{lc:{{{console}}}}}|{{#if:{{{2|}}}|{{lc:{{{1}}}}}}}}}}}<!-- happyface
-->{{#vardefine:key|{{#switch:{{lc:{{#if:{{{key|}}}|{{{key}}}|{{{2}}}}}}}
| leftstick
| left stick
| left thumbstick
| lstick = Left Stick
| rightstick
| right stick
| right thumbstick
| rstick = Right Stick
| left trigger
| lt = LT
| left bumper
| lb = LB
| right trigger
| rt = RT
| right bumper
| rb = RB
| left d-pad
| left dpad
| l = Left
| right d-pad
| right dpad
| r = Right
| up d-pad
| up dpad
| u = Up
| down d-pad
| down dpad
| d = Down
| d-pad
| dpad = Dpad
| m = Menu
| o = Circle
| touchpad = Touch Pad
| lmb
| left click = Left
| rmb
| right click = Right
| #default = {{ucfirst:{{#if:{{{key|}}}|{{{key}}}|{{{2}}}}}}}
}}}}<!--
-->{{#vardefine:keyboard|{{lc:{{#if:{{{keyboard|}}}|{{{keyboard}}}|{{#if:{{{2|}}}||{{{1|}}}}}}}}}}}<!--
 
-->{{#if: {{#var:console}} | [[File:{{#switch: {{#var:console}}
|playstation 3
|ps3=PS3
|ps
|playstation
|playstation 4
|ps4=PS4
|psmove
|move=PSMove
|xbox360
|360=360
|gesture=Gesture
|keyboard
|mouse=Keyboard
|oculus=Oculus
|remote=Remote
|steam=Steam
|switch=Switch
|vita=Vita
|vive=Vive
|wii=Wii
|wiiu=WiiU
|xbox
|xbox one
|xboxone
|xbone
|xbox1=XboxOne
|ouya=Ouya
|undefined}}<!--
 
-->{{#ifeq:{{#var:console}}|mouse|{{#switch: {{lc:{{{variant}}}}}
|dark=_White_Mouse_
|light=_Black_Mouse_
|#default = _White_Mouse_
}}}} {{#var:key}}.png|alt={{#var:key}}|{{{size|20px}}}|{{{link|Controls}}}|{{#var:key}}]] }}<!-- the above depends on the presence of keyname.png, and only affects console keys, so it doesn't matter for now. Leaving it for future purposes
 
The following handles the keyboard keys display
 
-->{{#if: {{#var:keyboard}} | <span class="key">[[Controls|<kbd class="{{#switch: {{lc:{{{keyboardvariant}}}}} |dark=keysDark|light=keysLight|keysDark}}"><!--


-->{{#switch:{{#var:keyboard}}
-->{{#switch:{{#var:keyboard}}

Revision as of 17:09, 7 January 2021

Documentation

When used, this template displays game controls, supporting both keyboard keys and controller buttons. Images will need to be added for the latter.

Those keys are also links to the Controls page, although this can be changed to another page by editing the relevant link in Template:Key.

Usage

{{key | button}}

  • button is the keyboard key to be pressed. Some key inputs, such as Shift or Tab will automatically add symbols or other formatting. Any other inputs will be output as they are with the first letter capitalized.
  • These keys are not case sensitive, so shift and Shift will both give ⇧ Shift.

For mouse buttons:

{{key | mouse | button}}

Example

Press {{Key|Alt}} and {{Key|f4}} at the same time.

produces:
Press Alt and F4 at the same time.

Themes

Light: Spacebar Dark: Spacebar

Mouse Buttons

Default theme: Light
LeftMiddleRightMouse

Keyboard Keys

Default theme: Dark

Numbers

0123456789

Letters & Punctuation

ABCDEFGHIJKLMNOPQRSTUVWXYZ
*[]<>-+?" ;\Spacebar~

Special

AltBkspCaps⌘ CmdCtrlDelEnd↵ EnterEscHomeInsNum lockPage downPage upPrint screen⇧ ShiftTab ↹⊞ Windows
F1F2F3F4F5F6F7F8F9F10F11F12

Alternate Models

← Backspace↵ Enter↵ EnterPlus⇧ Shift