Template:Key: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (changed link target to controls meu page)
mNo edit summary
Line 1: Line 1:
<includeonly>{{#vardefine:console|{{#if:{{{console|}}}|{{lc:{{{console}}}}}|{{#if:{{{2|}}}|{{lc:{{{1}}}}}}}}}}}<!--
{{doc}}[[Category:Templates]] Credit to "Nicolae 'Xelu' Berbece" of "Those Awesome Guys" for key images.
-->{{#vardefine:key|{{#switch:{{lc:{{#if:{{{key|}}}|{{{key}}}|{{{2}}}}}}}
<includeonly><onlyinclude>{{#vardefine:inputmethod|{{#switch:{{lc:{{{1}}}}}|mouse=mouse|#default=keyboard}}}}{{#vardefine:theme|{{#ifeq:{{lc:{{{theme}}}}}|light|Light|Dark}}}}<!--
| 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}}
Mouse Buttons:
|playstation 3
-->{{#ifeq:{{#var:inputmethod}}|mouse|[[File:Mouse_{{#switch:{{lc:{{{2}}}}}
|ps3=PS3
| primary | one | 1 | left | l = Left
|ps
| three | 3 | middle | m = Middle
|playstation
| secondary | two | 2 | right | r = Right
|playstation 4
| #default = Simple
|ps4=PS4
}}_Key_{{#var:theme}}.png|20px|link=Controls Menu#Default Keybindings]]}}<!--
|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}}}}}
Keyboard Keys:
|dark=_White_Mouse_
-->{{#ifeq:{{#var:inputmethod}}|keyboard|[[File:{{#switch:{{lc:{{{2}}}}}
|light=_Black_Mouse_
| zero | 0 = 0
|#default = _White_Mouse_
| one | 1 = 1
}}}} {{#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
| two | 2 = 2
 
| three | 3 = 3
The following handles the keyboard keys display
| four | 4 = 4
 
| five | 5 = 5
-->{{#if: {{#var:keyboard}} | <span class="key">[[Controls_Menu|<kbd class="{{#switch: {{lc:{{{keyboardvariant}}}}} |dark=keysDark|light=keysLight|keysLight}}"><!--
| six | 6 = 6
 
| seven | 7 = 7
-->{{#switch:{{#var:keyboard}}
| eight | 8 = 8
 
| nine | 9 = 9
<!--Standard keyboard values-->
| ten | 10 = 10
|caps lock = ⇪ Caps Lock
| eleven | 11 = 11
|shift = ⇧ Shift
| twelve | 12 = 12
|lshift
| a = A
|left shift = ⇧ Left Shift
| alt | left alt | lalt | right alt | ralt = Alt
|rshift
| down = Arrow_Down
|right shift = ⇧ Right Shift
| left = Arrow_Left
|return = ↵ Return
| right = Arrow_Right
|enter = ↵ Enter
| up = Arrow_Up
|esc = Esc
| asterisk | * = Asterisk
|ctrl = Ctrl
| b = B
|lctrl
| backspace | bksp = Backspace{{#if:{{{alt|}}}|_Alt}}
|left ctrl = Left Ctrl
| left bracket | lbracket = Bracket_Left
|rctrl
| right bracket | rbracket = Bracket_Right
|right ctrl = Right Ctrl
| c = C
|alt = Alt
| caps lock | caps = Caps_Lock
|lalt
| com | command = Command
|left alt = Left Alt
| ctrl | left ctrl | lctrl | right ctrl | rctrl = Ctrl
|ralt
| d = D
|right alt = Right Alt
| del | delete = Del
|cmd = ⌘ Cmd
| e = E
|command = ⌘ Command
| end = End
|opt
| enter | return = Enter{{#if:{{{alt|}}}|_Alt|{{#if:{{{tall|}}}|_Tall}}}}
|option = ⌥ Option
| esc | escape = Esc
|tab = Tab ↹
| f = F
|backspace = ← Backspace
| f1 = F1
|space = Spacebar
| f2 = F2
|super = ⊞ Super
| f3 = F3
|menu = ≣ Menu
| f4 = F4
|windows = ⊞ Windows
| f5 = F5
|up =
| f6 = F6
|down =
| f7 = F7
|left =
| f8 = F8
|right =
| f9 = F9
|#default = {{ucfirst:{{#var:keyboard}}}}
| f10 = F10
}}</kbd>]]</span>
| f11 = F11
}}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude>
| f12 = F12
| g = G
| h = H
| home = Home
| i = I
| ins | insert = Insert
| j = J
| k = K
| l = L
| m = M
| < | mark left | less than | less | lt = Mark_Left
| > | mark right | greater than | greater | gt = Mark_Right
| - | minus = Minus
| n = N
| num lock = Num_Lock
| o = O
| p = P
| page down | pg down | pgdown = Page_Down
| page up | pg up | pgup = Page_Up
| + | plus = Plus{{#if:{{{tall|}}}|_Tall}}
| print screen | print | prt scrn | prtscrn = Print_Screen
| q = Q
| ? | question | question mark = Question
| " | quote | quotation marks | quotes | quotation mark = Quote
| r = R
| s = S
| ; | semicolon = Semicolon
| shift | left shift | right shift | lshift | rshift = Shift{{#if:{{{alt|}}}|_Alt}}
| \ | backslash | back slash | slash = Slash
| &nbsp; | space | spacebar | space bar = Space
| t = T
| tab = Tab
| ~ | tilde | tilda | grave = Tilda
| u = U
| v = V
| w = W
| win | windows = Win
| x = X
| y = Y
| z = Z
}}_Key_{{#var:theme}}.png|20px|link=Controls Menu#Default Keybindings]]}}</onlyinclude></includeonly>

Revision as of 03:29, 13 July 2022

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 File:Key Dark.png.

For mouse buttons:

{{key | mouse | button}}

  • left, middle, right and none are accepted, giving respectively: , , and

Example

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

produces:
Press File:Key Dark.png and File:Key Dark.png at the same time.

Themes

Light: File:Key Light.png Dark: File:Key Dark.png

Mouse Buttons

Default theme: Light

Keyboard Keys

Default theme: Dark

Numbers

File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png

Letters & Punctuation

File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png
File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png

Special

File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png
File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png

Alternate Models

File:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.pngFile:Key Dark.png

Credit to "Nicolae 'Xelu' Berbece" of "Those Awesome Guys" for key images.