Controls – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Str moved page Template:Keyboard to Template:KeyboardShortcut without leaving a redirect)
(Fix description)
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>|}}|}}|}}|}}</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>
==Usage==
== Usage ==
Useful for displaying keyboard operations ''e.g.''
{{<nowiki/>KeyboardShortcut|'''''key1'''''|'''''key2'''''|'''''key3'''''|'''''key4'''''}}
:Use <tt><nowiki>{{kb|Ctrl|Shift|T}}</nowiki></tt> to create {{kb|Ctrl|Shift|T}} where needed.


Up to 4 keys may be specified.
{| class="wikitable"
|+ Examples
! Code
! Result
|-
| <nowiki>{{KeyboardShortcut}}</nowiki>
| {{KeyboardShortcut}}
|-
| <nowiki>{{KeyboardShortcut|Ctrl}}</nowiki>
| {{KeyboardShortcut|Ctrl}}
|-
| <nowiki>{{KeyboardShortcut|Ctrl|Shift}}</nowiki>
| {{KeyboardShortcut|Ctrl|Shift}}
|-
| <nowiki>{{KeyboardShortcut|Ctrl|Shift|T}}</nowiki>
| {{KeyboardShortcut|Ctrl|Shift|T}}
|-
| <nowiki>{{KeyboardShortcut|Ctrl|Alt|Shift|T}}</nowiki>
| {{KeyboardShortcut|Ctrl|Alt|Shift|T}}
|-
| <nowiki>{{KeyboardShortcut|Ctrl|Alt|SHIFT|T|U}}</nowiki>
| {{KeyboardShortcut|Ctrl|Alt|SHIFT|T|U}}
|}


<!-- Categories this template should belong to -->
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
[[Category:Templates|{{uc:{{PAGENAME}}}}]]
</noinclude>
</noinclude>

Revision as of 02:53, 26 December 2020

Usage

{{KeyboardShortcut|key1|key2|key3|key4}}

Examples
Code Result
{{KeyboardShortcut}} -no keys defined-
{{KeyboardShortcut|Ctrl}} Ctrl
{{KeyboardShortcut|Ctrl|Shift}} Ctrl + Shift
{{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