Template:Key: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (changed link target to controls meu page)
mNo edit summary
 
(20 intermediate revisions by 2 users not shown)
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}}}}<!--
| 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|{{#vardefine:button|{{#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
}}}}[[File:Mouse {{#var:button}} Key {{ucfirst:{{{theme|Light}}}}}.png|x{{{size|28px}}}|{{#ifeq:{{#var:button}}|Simple||{{#var:button}} Mouse}}|link={{{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|{{#vardefine:key|{{#switch:{{lc:{{{2|{{{1}}}}}}}}
|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 | cmd | command = Command
|left alt = Left Alt
| control | ctrl | left control | left ctrl | lctrl | right control | 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
| fn | function = Function
| 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
}}}}[[File:{{#var:key}} Key {{ucfirst:{{{theme|Dark}}}}}.png|x{{{size|28px}}}|{{#var:key}}|link={{{link|Controls Menu#Default Keybindings}}}]]}}</onlyinclude></includeonly>

Latest revision as of 19:59, 16 November 2023

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}}

  • left, middle, right and none are accepted, giving respectively: Left Mouse, Middle Mouse, Right Mouse and

Example

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

produces:
Press Alt and F4 at the same time.

Themes

Light: Space Dark: Space

Mouse Buttons

Default theme: Light
Left MouseMiddle MouseRight Mouse

Keyboard Keys

Default theme: Dark

Numbers

0123456789

Letters & Punctuation

ABCDEFGHIJKLMNOPQRSTUVWXYZ
AsteriskBracket LeftBracket RightMark LeftMark RightMinusPlusQuestionQuoteSemicolonSlashSpaceTilda

Special

AltArrow DownArrow LeftArrow RightArrow UpBackspaceCaps LockCommandCtrlDelEndEnterEscHomeInsertNum LockPage_DownPage_UpPrint ScreenShiftTabWin
F1F2F3F4F5F6F7F8F9F10F11F12

Alternate Models

Backspace_AltEnter_AltEnter_TallPlus_TallShift_Alt

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