Controls/Control – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add specific consoles support)
m (Add source, Add license, Fix documentation)
Line 60: Line 60:
|back
|back
|select= <span class="control-gamepad">⇷</span>
|select= <span class="control-gamepad">⇷</span>
|share= <span class="control-gamepad">⇦</span>
|options= <span class="control-gamepad">⇨</span>
|option= <span class="control-gamepad">⇨</span>
|touchpad= <span class="control-gamepad">⇧</span>
|touchpad= <span class="control-gamepad">⇧</span>
|start= <span class="control-gamepad">⇸</span>
|start= <span class="control-gamepad">⇸</span>
|share= <span class="control-gamepad">⇦</span>
|#default= -wrong PlayStation key defined-{{TemplateCase||[[Category:Controls template usage error]]}}
|#default= -wrong PlayStation key defined-{{TemplateCase||[[Category:Controls template usage error]]}}
}}
}}
Line 148: Line 148:
}}</includeonly><noinclude>{{Doc/Template
}}</includeonly><noinclude>{{Doc/Template
|descr= Displays a keyboard key or a mouse icon — used by {{Template|Controls}}. It also adds the page to the [[:Category:Controls template usage error|Controls template usage error]] category on usage error.
|descr= Displays a keyboard key or a mouse icon — used by {{Template|Controls}}. It also adds the page to the [[:Category:Controls template usage error|Controls template usage error]] category on usage error.
{{Feature|informative|
Gamepad icons use '''PromptFont''', a very nice font made under the {{Link|https://scripts.sil.org/cms/scripts/page.php?id{{=}}OFL|SIL Open Font Licence}}.<br>
Find it at {{Link|https://shinmera.github.io/promptfont/}}.
}}
|param1= control
|param1= control
|descr1= can be one of:
|descr1= can be one of:
Line 156: Line 161:
*** mouseR or RMB
*** mouseR or RMB
*** mouseM or MMB
*** mouseM or MMB
** pad button:
** generic pad buttons:
*** padStart
*** padUp / padDown / padLeft / padRight
*** padUp / padDown / padLeft / padRight
*** XBox-specific:
*** padA / padB / padX / padY
**** padA / padB / padX / padY
*** padLB / padLT / padLSB
**** padLB / padLT / padLSB
*** padRB / padRT / padRSB
**** padRB / padRT / padRSB
*** padBack / padStart
**** padBack
** XBox-specific with {{hl|Xbox}} as first parameter:
*** PlayStation-specific:
*** A / B / X / Y
**** padCross / padCircle / padSquare / padTriangle
*** LB / LT / LSB
**** padL1 / padL2 / padL3
*** RB / RT / RSB
**** padR1 / padR2 / padR3
*** Back / Start
**** padSelect
** PlayStation-specific with {{hl|DualShock}} or {{hl|PlayStation}} as first parameter:
*** Cross / Circle / Square / Triangle (also supports A / B / X / Y)
*** L1 / L2 / L3 (also supports LB / LT / LSB)
*** R1 / R2 / R3 (also supports RB / RT / RSB)
*** Select / Start (also supports Back)
*** Options / Touchpad / Share
** pre-formatted key:
** pre-formatted key:
*** escape / enter / delete / backspace
*** escape / enter / delete / backspace
Line 221: Line 230:
<nowiki>{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}}
<nowiki>{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}}
{{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}}
{{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}}
{{Controls/Control|padLB}}{{Controls/Control|padLT}}{{Controls/Control|padLSB}}{{Controls/Control|padRB}}{{Controls/Control|padRT}}{{Controls/Control|padRSB}}
{{Controls/Control|padBack}}{{Controls/Control|padStart}}</nowiki>
{{Controls/Control|padBack}}{{Controls/Control|padStart}}</nowiki>
<hr>
|result9= <nowiki/>
{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}}
{{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}}
{{Controls/Control|padLB}}{{Controls/Control|padLT}}{{Controls/Control|padLSB}}{{Controls/Control|padRB}}{{Controls/Control|padRT}}{{Controls/Control|padRSB}}
{{Controls/Control|padBack}}{{Controls/Control|padStart}}
 
|example10= <nowiki/>
<nowiki>{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}}
<nowiki>{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}}
{{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}}
{{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}}
Line 231: Line 247:
{{Controls/Control|dualshock|A}}{{Controls/Control|dualshock|B}}{{Controls/Control|dualshock|X}}{{Controls/Control|dualshock|Y}}
{{Controls/Control|dualshock|A}}{{Controls/Control|dualshock|B}}{{Controls/Control|dualshock|X}}{{Controls/Control|dualshock|Y}}
{{Controls/Control|dualshock|LB}}{{Controls/Control|dualshock|LT}}{{Controls/Control|dualshock|LSB}}{{Controls/Control|dualshock|RB}}{{Controls/Control|dualshock|RT}}{{Controls/Control|dualshock|RSB}}
{{Controls/Control|dualshock|LB}}{{Controls/Control|dualshock|LT}}{{Controls/Control|dualshock|LSB}}{{Controls/Control|dualshock|RB}}{{Controls/Control|dualshock|RT}}{{Controls/Control|dualshock|RSB}}
{{Controls/Control|dualshock|Back}}{{Controls/Control|dualshock|Start}}</nowiki>
{{Controls/Control|dualshock|Back}}{{Controls/Control|dualshock|Start}}</nowiki><br>
 
<nowiki>{{Controls/Control|dualshock|Options}}{{Controls/Control|dualshock|Touchpad}}{{Controls/Control|dualshock|Share}}</nowiki>
|result9= <nowiki/>
|result10= <nowiki/>
{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}}
{{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}}
{{Controls/Control|padBack}}{{Controls/Control|padStart}}
<hr>
{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}}
{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}}
{{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}}
{{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}}
Line 246: Line 258:
{{Controls/Control|dualshock|A}}{{Controls/Control|dualshock|B}}{{Controls/Control|dualshock|X}}{{Controls/Control|dualshock|Y}}
{{Controls/Control|dualshock|A}}{{Controls/Control|dualshock|B}}{{Controls/Control|dualshock|X}}{{Controls/Control|dualshock|Y}}
{{Controls/Control|dualshock|LB}}{{Controls/Control|dualshock|LT}}{{Controls/Control|dualshock|LSB}}{{Controls/Control|dualshock|RB}}{{Controls/Control|dualshock|RT}}{{Controls/Control|dualshock|RSB}}
{{Controls/Control|dualshock|LB}}{{Controls/Control|dualshock|LT}}{{Controls/Control|dualshock|LSB}}{{Controls/Control|dualshock|RB}}{{Controls/Control|dualshock|RT}}{{Controls/Control|dualshock|RSB}}
{{Controls/Control|dualshock|Back}}{{Controls/Control|dualshock|Start}}
{{Controls/Control|dualshock|Back}}{{Controls/Control|dualshock|Start}}<br>
{{Controls/Control|dualshock|Options}}{{Controls/Control|dualshock|Touchpad}}{{Controls/Control|dualshock|Share}}


}}</noinclude>
}}</noinclude>

Revision as of 22:50, 29 June 2022

Displays a keyboard key or a mouse icon — used by {{Controls}}. It also adds the page to the Controls template usage error category on usage error.

Gamepad icons use PromptFont, a very nice font made under the SIL Open Font Licence.
Find it at https://shinmera.github.io/promptfont/.

This template is used on these pages.

Usage

{{Controls/Control|control}}

  • control: can be one of:
    • mouse icon (case-insensitive):
      • mouse
      • mouseL or LMB
      • mouseL2 or LMB2
      • mouseR or RMB
      • mouseM or MMB
    • generic pad buttons:
      • padUp / padDown / padLeft / padRight
      • padA / padB / padX / padY
      • padLB / padLT / padLSB
      • padRB / padRT / padRSB
      • padBack / padStart
    • XBox-specific with Xbox as first parameter:
      • A / B / X / Y
      • LB / LT / LSB
      • RB / RT / RSB
      • Back / Start
    • PlayStation-specific with DualShock or PlayStation as first parameter:
      • Cross / Circle / Square / Triangle (also supports A / B / X / Y)
      • L1 / L2 / L3 (also supports LB / LT / LSB)
      • R1 / R2 / R3 (also supports RB / RT / RSB)
      • Select / Start (also supports Back)
      • Options / Touchpad / Share
    • pre-formatted key:
      • escape / enter / delete / backspace
      • up / down / left / right
      • pageUp / pageDown
      • control / LCtrl
      • RCtrl / RControl
      • RAlt
      • shift
      • RShift
      • tabulation
      • LWin / Windows
      • RWin / RWindows
      • num0..9 / num/ / num* / num- / num+ / num. / numEnter
    • anything else for a keyboard key - the first letter will be capitalised (e.g abcdEf will become AbcdEf)
Examples
Code Result
{{Controls/Control}} -no key defined-
{{Controls/Control|ctrl}} Ctrl
{{Controls/Control|Ctrl}} Ctrl
{{Controls/Control|a}} A
{{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|RMB}} MouseLeft Mouse ButtonDouble Left Mouse ButtonMiddle Mouse ButtonRight Mouse Button
{{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}} EscEnter ↵Del↟ PgUp↡ PgDown
{{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}} CtrlCtrlRCtrlRCtrlAltGr⇧ ShiftRShift ⇧↹ Tab⊞ Win⊞ WinRWin ⊞RWin ⊞

{{Controls/Control|num/}}{{Controls/Control|num*}}{{Controls/Control|num-}}{{Controls/Control|num+}}
{{Controls/Control|num7}}{{Controls/Control|num8}}{{Controls/Control|num9}}
{{Controls/Control|num4}}{{Controls/Control|num5}}{{Controls/Control|num6}}
{{Controls/Control|num1}}{{Controls/Control|num2}}{{Controls/Control|num3}}
{{Controls/Control|num0}}{{Controls/Control|num.}}{{Controls/Control|numenter}}

NUM /NUM *NUM -NUM +
NUM 7NUM 8NUM 9
NUM 4NUM 5NUM 6
NUM 1NUM 2NUM 3
NUM 0NUM .NUM Enter ↵

{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}} {{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}} {{Controls/Control|padLB}}{{Controls/Control|padLT}}{{Controls/Control|padLSB}}{{Controls/Control|padRB}}{{Controls/Control|padRT}}{{Controls/Control|padRSB}} {{Controls/Control|padBack}}{{Controls/Control|padStart}}

{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}} {{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}} {{Controls/Control|xbox|LB}}{{Controls/Control|xbox|LT}}{{Controls/Control|xbox|LSB}}{{Controls/Control|xbox|RB}}{{Controls/Control|xbox|RT}}{{Controls/Control|xbox|RSB}} {{Controls/Control|xbox|Back}}{{Controls/Control|xbox|Start}}


{{Controls/Control|dualshock|up}}{{Controls/Control|dualshock|down}}{{Controls/Control|dualshock|left}}{{Controls/Control|dualshock|right}} {{Controls/Control|dualshock|A}}{{Controls/Control|dualshock|B}}{{Controls/Control|dualshock|X}}{{Controls/Control|dualshock|Y}} {{Controls/Control|dualshock|LB}}{{Controls/Control|dualshock|LT}}{{Controls/Control|dualshock|LSB}}{{Controls/Control|dualshock|RB}}{{Controls/Control|dualshock|RT}}{{Controls/Control|dualshock|RSB}} {{Controls/Control|dualshock|Back}}{{Controls/Control|dualshock|Start}}
{{Controls/Control|dualshock|Options}}{{Controls/Control|dualshock|Touchpad}}{{Controls/Control|dualshock|Share}}