Controls – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Add specific consoles support) |
Lou Montana (talk | contribs) (Add console's fourth key) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch:{{lc:{{{1}}}}} | <includeonly>{{#switch:{{lc:{{{1}}}}} | ||
|xbox= {{#if:{{{2|}}} | |xbox= {{#if:{{{2|}}} | ||
| {{Controls/Control|xbox|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|xbox|{{{3}}}}}{{#if:{{{4|}}}|| + {{Controls/Control|xbox|{{{ | | {{Controls/Control|xbox|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|xbox|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|xbox|{{{4}}}}}{{#if:{{{5|}}}| + {{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 | |dualshock | ||
|playstation= {{#if:{{{2|}}} | |playstation= {{#if:{{{2|}}} | ||
| {{Controls/Control|dualshock|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|dualshock|{{{3}}}}}{{#if:{{{4|}}}|| + {{Controls/Control|dualshock|{{{ | | {{Controls/Control|dualshock|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|dualshock|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|dualshock|{{{4}}}}}{{#if:{{{5|}}}| + {{Controls/Control|dualshock|{{{5}}}}}}}}}}} | ||
| -no DualShock controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | | -no DualShock controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | ||
}} | }} | ||
Line 33: | Line 33: | ||
|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> |
Revision as of 16:39, 29 June 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
- 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 dualshock/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}} |
⇓ + ↖ + ⇻ |