Controls – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add specific consoles support)
(Add mouse scrollwheel, up, down and up and down)
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{lc:{{{1}}}}}
<includeonly>{{#switch:{{lc:{{{1}}}}}
|xbox= {{#if:{{{2|}}}
|xbox= {{#if:{{{2|}}}
| {{Controls/Control|xbox|{{{2}}}}}{{#if:{{{3|}}}|&#32;+ {{Controls/Control|xbox|{{{3}}}}}{{#if:{{{4|}}}||&#32;+ {{Controls/Control|xbox|{{{4}}}}}}}}}
| {{Controls/Control|xbox|{{{2}}}}}{{#if:{{{3|}}}|&#32;+ {{Controls/Control|xbox|{{{3}}}}}{{#if:{{{4|}}}|&#32;+ {{Controls/Control|xbox|{{{4}}}}}{{#if:{{{5|}}}|&#32;+ {{Controls/Control|xbox|{{{5}}}}}}}}}}}
| -no Xbox controls defined-{{TemplateCase||[[Category:Controls template usage error]]}}
| -no Xbox controls defined-{{TemplateCase||[[Category:Controls template usage error]]}}
}}
}}
|dualshock
|playstation
|playstation= {{#if:{{{2|}}}
|playstation= {{#if:{{{2|}}}
| {{Controls/Control|dualshock|{{{2}}}}}{{#if:{{{3|}}}|&#32;+ {{Controls/Control|dualshock|{{{3}}}}}{{#if:{{{4|}}}||&#32;+ {{Controls/Control|dualshock|{{{4}}}}}}}}}
| {{Controls/Control|playstation|{{{2}}}}}{{#if:{{{3|}}}|&#32;+ {{Controls/Control|playstation|{{{3}}}}}{{#if:{{{4|}}}|&#32;+ {{Controls/Control|playstation|{{{4}}}}}{{#if:{{{5|}}}|&#32;+ {{Controls/Control|playstation|{{{5}}}}}}}}}}}
| -no DualShock controls defined-{{TemplateCase||[[Category:Controls template usage error]]}}
| -no Playstation controls defined-{{TemplateCase||[[Category:Controls template usage error]]}}
}}
}}
|#default= {{#if:{{{1|}}}
|#default= {{#if:{{{1|}}}
Line 20: Line 20:
** mouseR or RMB
** mouseR or RMB
** mouseM or MMB
** mouseM or MMB
** mouseSW or MSW
** mouseSWU or MSWU
** mouseSWD or MSWD
* Keyboard key can be anything - the first letter will be capitalised, see {{Template|Controls/Control}}.
* Keyboard key can be anything - the first letter will be capitalised, see {{Template|Controls/Control}}.


|param1= ctrl1
|param1= ctrl1
|descr1= first control - if {{hl|xbox}} or {{hl|dualshock}}/{{hl|playstation}} (case-insensitive), all the following keys will be XBox- or PlayStation-stylised (see {{Template|Controls/Control}})
|descr1= first control - if {{hl|xbox}} or {{hl|playstation}} (case-insensitive), all the following keys will be XBox- or PlayStation-stylised (see {{Template|Controls/Control}})


|param2= ctrl2
|param2= ctrl2
Line 33: Line 36:
|param4= ctrl4
|param4= ctrl4
|descr4= (Optional) fourth control
|descr4= (Optional) fourth control
|param5= ctrl5
|descr5= (Optional) fourth console control


|example1= <nowiki>{{Controls}}</nowiki>
|example1= <nowiki>{{Controls}}</nowiki>
Line 54: Line 60:
|example7= <nowiki/>
|example7= <nowiki/>
<nowiki>{{Controls|Xbox|A|LT|start}}</nowiki><br>
<nowiki>{{Controls|Xbox|A|LT|start}}</nowiki><br>
<nowiki>{{Controls|dualshock|cross|L1|start}}</nowiki><br>
<nowiki>{{Controls|playstation|cross|L1|start}}</nowiki><br>
<nowiki>{{Controls|padA|padLT|padStart}}</nowiki>
<nowiki>{{Controls|padA|padLT|padStart}}</nowiki>
|result7= <nowiki/>
|result7= <nowiki/>
{{Controls|Xbox|A|LT|start}}<br>
{{Controls|Xbox|A|LT|start}}<br>
{{Controls|dualshock|cross|L1|start}}<br>
{{Controls|playstation|cross|L1|start}}<br>
{{Controls|padA|padLT|padStart}}
{{Controls|padA|padLT|padStart}}
}}</noinclude>
}}</noinclude>

Revision as of 16:42, 16 December 2022

Shows a key-styled keyboard shortcut and/or a mouse button. It also adds the page to the Controls template usage error category on usage error.

  • Mouse button can be (case-insensitive):
    • mouseL or LMB
    • mouseL2 or LMB2
    • mouseR or RMB
    • mouseM or MMB
    • mouseSW or MSW
    • mouseSWU or MSWU
    • mouseSWD or MSWD
  • Keyboard key can be anything - the first letter will be capitalised, see {{Controls/Control}}.

This template is used on these pages.

Usage

{{Controls|ctrl1|ctrl2|ctrl3|ctrl4|ctrl5}}

  • ctrl1: first control - if xbox or playstation (case-insensitive), all the following keys will be XBox- or PlayStation-stylised (see {{Controls/Control}})
  • ctrl2: (Optional) second control
  • ctrl3: (Optional) third control
  • ctrl4: (Optional) fourth control
  • ctrl5: (Optional) fourth console control
Examples
Code Result
{{Controls}} -no controls defined-
{{Controls|Ctrl}} Ctrl
{{Controls|Ctrl|LMB}} Ctrl + Left Mouse Button
{{Controls|Ctrl|Shift|T}} Ctrl + ⇧ Shift + T
{{Controls|Ctrl|Alt|Shift|T}} Ctrl + Alt + ⇧ Shift + T
{{Controls|Ctrl|Alt|Shift|T|U}} Ctrl + Alt + ⇧ Shift + T

{{Controls|Xbox|A|LT|start}}
{{Controls|playstation|cross|L1|start}}
{{Controls|padA|padLT|padStart}}

+ +
+ +
+ +