Controls – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Fix description)
m (Add Template:Doc/Template usage)
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|<span class="keyboard">{{{1}}}</span>{{#if:{{{2|}}}|&#32;+ <span class="keyboard">{{{2}}}</span>{{#if:{{{3|}}}|&#32;+ <span class="keyboard">{{{3}}}</span>{{#if:{{{4|}}}|&#32;+ <span class="keyboard">{{{4}}}</span>|}}|}}|}}|-no keys defined-}}</includeonly><noinclude>
<includeonly>{{#if:{{{1|}}}|<span class="keyboard">{{{1}}}</span>{{#if:{{{2|}}}|&#32;+ <span class="keyboard">{{{2}}}</span>{{#if:{{{3|}}}|&#32;+ <span class="keyboard">{{{3}}}</span>{{#if:{{{4|}}}|&#32;+ <span class="keyboard">{{{4}}}</span>|}}|}}|}}|-no keys defined-}}</includeonly><noinclude>{{Doc/Template
== Usage ==
|descr= Shows a key-styled keyboard shortcut.
{{<nowiki/>KeyboardShortcut|'''''key1'''''|'''''key2'''''|'''''key3'''''|'''''key4'''''}}
|param1= key1
 
|descr1= first key
{| class="wikitable"
|param2= key2
|+ Examples
|descr2= (Optional) second key
! Code
|param3= key3
! Result
|descr3= (Optional) third key
|-
|param4= key4
| <nowiki>{{KeyboardShortcut}}</nowiki>
|descr4= (Optional) fourth key
| {{KeyboardShortcut}}
|param5= key5
|-
|descr5= (Optional) fifth key
| <nowiki>{{KeyboardShortcut|Ctrl}}</nowiki>
|example1= <nowiki>{{KeyboardShortcut}}</nowiki>
| {{KeyboardShortcut|Ctrl}}
|result1= {{KeyboardShortcut}}
|-
|example2= <nowiki>{{KeyboardShortcut|Ctrl}}</nowiki>
| <nowiki>{{KeyboardShortcut|Ctrl|Shift}}</nowiki>
|result2= {{KeyboardShortcut|Ctrl}}
| {{KeyboardShortcut|Ctrl|Shift}}
|example3= <nowiki>{{KeyboardShortcut|Ctrl|Shift|T}}</nowiki>
|-
|result3= {{KeyboardShortcut|Ctrl|Shift|T}}
| <nowiki>{{KeyboardShortcut|Ctrl|Shift|T}}</nowiki>
|example4= <nowiki>{{KeyboardShortcut|Ctrl|Alt|Shift|T}}</nowiki>
| {{KeyboardShortcut|Ctrl|Shift|T}}
|result4= {{KeyboardShortcut|Ctrl|Alt|Shift|T}}
|-
|example5= <nowiki>{{KeyboardShortcut|Ctrl|Alt|Shift|T|U}}</nowiki>
| <nowiki>{{KeyboardShortcut|Ctrl|Alt|Shift|T}}</nowiki>
|result5= {{KeyboardShortcut|Ctrl|Alt|Shift|T|U}}
| {{KeyboardShortcut|Ctrl|Alt|Shift|T}}
}}</noinclude>
|-
| <nowiki>{{KeyboardShortcut|Ctrl|Alt|SHIFT|T|U}}</nowiki>
| {{KeyboardShortcut|Ctrl|Alt|SHIFT|T|U}}
|}
 
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
</noinclude>

Revision as of 18:56, 24 January 2021

Shows a key-styled keyboard shortcut.

This template is used on these pages.

Usage

{{Controls|key1|key2|key3|key4|key5}}

  • key1: first key
  • key2: (Optional) second key
  • key3: (Optional) third key
  • key4: (Optional) fourth key
  • key5: (Optional) fifth key
Examples
Code Result
{{KeyboardShortcut}} -no keys defined-
{{KeyboardShortcut|Ctrl}} Ctrl
{{KeyboardShortcut|Ctrl|Shift|T}} Ctrl + Shift + T
{{KeyboardShortcut|Ctrl|Alt|Shift|T}} Ctrl + Alt + Shift + T
{{KeyboardShortcut|Ctrl|Alt|Shift|T|U}} Ctrl + Alt + Shift + T