Template:Key: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(blanking until the variables extension is installed to prevent messy stuff on the few pages already using that template)
Tag: Blanking
mNo edit summary
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{doc}}[[Category:Templates]] Credit to "Nicolae 'Xelu' Berbece" of "Those Awesome Guys" for key images.
<includeonly><onlyinclude>{{#vardefine:inputmethod|{{#switch:{{lc:{{{1}}}}}|mouse=mouse|#default=keyboard}}}}<!--


Mouse Buttons:
-->{{#ifeq:{{#var:inputmethod}}|mouse|{{#vardefine:button|{{#switch:{{lc:{{{2}}}}}
| primary | one | 1 | left | l = Left
| three | 3 | middle | m = Middle
| secondary | two | 2 | right | r = Right
| #default = Simple
}}}}[[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}}}]]}}<!--
Keyboard Keys:
-->{{#ifeq:{{#var:inputmethod}}|keyboard|{{#vardefine:key|{{#switch:{{lc:{{{2|{{{1}}}}}}}}
| zero | 0 = 0
| one | 1 = 1
| two | 2 = 2
| three | 3 = 3
| four | 4 = 4
| five | 5 = 5
| six | 6 = 6
| seven | 7 = 7
| eight | 8 = 8
| nine | 9 = 9
| ten | 10 = 10
| eleven | 11 = 11
| twelve | 12 = 12
| a = A
| alt | left alt | lalt | right alt | ralt = Alt
| down = Arrow Down
| left = Arrow Left
| right = Arrow Right
| up = Arrow Up
| asterisk | * = Asterisk
| b = B
| backspace | bksp = Backspace{{#if:{{{alt|}}}|_Alt}}
| [ | left bracket | lbracket = Bracket Left
| ] | right bracket | rbracket = Bracket Right
| c = C
| caps lock | caps = Caps Lock
| com | cmd | command = Command
| control | ctrl | left control | left ctrl | lctrl | right control | right ctrl | rctrl = Ctrl
| d = D
| del | delete = Del
| e = E
| end = End
| enter | return = Enter{{#if:{{{alt|}}}|_Alt|{{#if:{{{tall|}}}|_Tall}}}}
| esc | escape = Esc
| f = F
| f1 = F1
| f2 = F2
| f3 = F3
| f4 = F4
| f5 = F5
| f6 = F6
| f7 = F7
| f8 = F8
| f9 = F9
| f10 = F10
| f11 = F11
| 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.