Controls – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{KeyboardShortcut" to "{{Controls") |
Lou Montana (talk | contribs) m (Fix examples, Add mouse buttons) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if:{{{1|}}}| | <includeonly>{{#if:{{{1|}}} | ||
|descr= Shows a key-styled keyboard shortcut. It also adds the page to the [[:Category: | | {{Controls/Control|{{{1}}}}}{{#if:{{{2|}}}| + {{Controls/Control|{{{2}}}}}{{#if:{{{3|}}}| + {{Controls/Control|{{{3}}}}}{{#if:{{{4|}}}| + {{Controls/Control|{{{4}}}}}|}}|}}|}} | ||
|param1= | |-no controls defined-{{TemplateCase||[[Category:Controls template usage error]]}} | ||
|descr1= first | }}</includeonly><noinclude>{{Doc/Template | ||
|param2= | |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. | ||
|descr2= (Optional) second | * Mouse button can be (case-insensitive): | ||
|param3= | ** mouseL or LMB | ||
|descr3= (Optional) third | ** mouseL2 or LMB2 | ||
|param4= | ** mouseR or RMB | ||
|descr4= (Optional) fourth | ** mouseM or MMB | ||
* Keyboard key can be anything - the first letter will be capitalised, see {{Template|Controls/Control}}. | |||
|param1= ctrl1 | |||
|descr1= first control | |||
|param2= ctrl2 | |||
|descr2= (Optional) second control | |||
|param3= ctrl3 | |||
|descr3= (Optional) third control | |||
|param4= ctrl4 | |||
|descr4= (Optional) fourth control | |||
|example1= <nowiki>{{Controls}}</nowiki> | |example1= <nowiki>{{Controls}}</nowiki> | ||
|result1= {{Controls}} | |result1= {{Controls}} | ||
|example2= <nowiki>{{Controls|Ctrl}}</nowiki> | |example2= <nowiki>{{Controls|Ctrl}}</nowiki> | ||
|result2= {{Controls|Ctrl}} | |result2= {{Controls|Ctrl}} | ||
|example3= <nowiki>{{Controls|Ctrl|Shift|T}}</nowiki> | |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}} | |||
}}</noinclude> | }}</noinclude> |
Revision as of 12:34, 20 December 2021
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}}
- ctrl1: first control
- ctrl2: (Optional) second control
- ctrl3: (Optional) third control
- ctrl4: (Optional) fourth 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 |