Controls – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Add Template:Doc/Template usage) |
Lou Montana (talk | contribs) m (Text replacement - "XBox" to "Xbox") |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{ | <includeonly>{{#switch:{{lc:{{{1}}}}} | ||
|descr= Shows a key-styled keyboard shortcut. | |xbox= {{#if:{{{2|}}} | ||
|param1= | | {{Controls/Control|xbox|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|xbox|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|xbox|{{{4}}}}}{{#if:{{{5|}}}| + {{Controls/Control|xbox|{{{5}}}}}}}}}}} | ||
|descr1= first | | -no Xbox controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | ||
|param2= | }} | ||
|descr2= (Optional) second | |playstation | ||
|param3= | |playstation= {{#if:{{{2|}}} | ||
|descr3= (Optional) third | | {{Controls/Control|playstation|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|playstation|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|playstation|{{{4}}}}}{{#if:{{{5|}}}| + {{Controls/Control|playstation|{{{5}}}}}}}}}}} | ||
|param4= | | -no Playstation controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | ||
|descr4= (Optional) fourth | }} | ||
|param5= | |#default= {{#if:{{{1|}}} | ||
|descr5= (Optional) | | {{Controls/Control|{{{1}}}}}{{#if:{{{2|}}}| + {{Controls/Control|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|{{{4}}}}}|}}|}}|}} | ||
|example1= <nowiki>{{ | |-no controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | ||
|result1= {{ | }} | ||
|example2= <nowiki>{{ | }}</includeonly><noinclude>{{Doc/Template | ||
|result2= {{ | |descr= Shows a key-styled keyboard shortcut and/or a mouse button. It also adds the page to the [[:Category:Controls template usage error|Controls template usage error]] category on usage error. | ||
|example3= <nowiki>{{ | * 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 {{Template|Controls/Control}}. | |||
|param1= ctrl1 | |||
|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 | |||
|descr2= (Optional) second control | |||
|param3= ctrl3 | |||
|descr3= (Optional) third control | |||
|param4= ctrl4 | |||
|descr4= (Optional) fourth control | |||
|param5= ctrl5 | |||
|descr5= (Optional) fourth console control | |||
|example1= <nowiki>{{Controls}}</nowiki> | |||
|result1= {{Controls}} | |||
|example2= <nowiki>{{Controls|Ctrl}}</nowiki> | |||
|result2= {{Controls|Ctrl}} | |||
|example3= <nowiki>{{Controls|Ctrl|LMB}}</nowiki> | |||
|result3= {{Controls|Ctrl|LMB}} | |||
|example4= <nowiki>{{Controls|Ctrl|Shift|T}}</nowiki> | |||
|result4= {{Controls|Ctrl|Shift|T}} | |||
|example5= <nowiki>{{Controls|Ctrl|Alt|Shift|T}}</nowiki> | |||
|result5= {{Controls|Ctrl|Alt|Shift|T}} | |||
|example6= <nowiki>{{Controls|Ctrl|Alt|Shift|T|U}}</nowiki> | |||
|result6= {{Controls|Ctrl|Alt|Shift|T|U}} | |||
|example7= <nowiki/> | |||
<nowiki>{{Controls|Xbox|A|LT|start}}</nowiki><br> | |||
<nowiki>{{Controls|playstation|cross|L1|start}}</nowiki><br> | |||
<nowiki>{{Controls|padA|padLT|padStart}}</nowiki> | |||
|result7= <nowiki/> | |||
{{Controls|Xbox|A|LT|start}}<br> | |||
{{Controls|playstation|cross|L1|start}}<br> | |||
{{Controls|padA|padLT|padStart}} | |||
}}</noinclude> | }}</noinclude> |
Latest revision as of 07:47, 20 June 2023
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
Code | Result |
---|---|
{{Controls}} | -no controls defined- |
{{Controls|Ctrl}} | Ctrl |
{{Controls|Ctrl|LMB}} | Ctrl + |
{{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}} |
⇓ + ↖ + ⇻ |