Template:Button: Difference between revisions

Template page
(Added documentation)
(Adding support for DS buttons. Let's hope this works.)
Tag: Reverted
Line 1: Line 1:
<includeonly><!--
<includeonly>{{#switch: {{{1|}}}
-->{{#if: {{{1|}}} | <kbd>{{{1|}}}</kbd> }}<!--
| kbd = {{#if: {{{2|}}} | <kbd>{{{2|}}}</kbd> }}<!--
-->{{#if: {{{2|}}} | +<kbd>{{{2|}}}</kbd> }}<!--
-->{{#if: {{{3|}}} | +<kbd>{{{3|}}}</kbd> }}<!--
-->{{#if: {{{3|}}} | +<kbd>{{{3|}}}</kbd> }}<!--
-->{{#if: {{{4|}}} | +<kbd>{{{4|}}}</kbd> }}<!--
-->{{#if: {{{4|}}} | +<kbd>{{{4|}}}</kbd> }}<!--
-->{{#if: {{{5|}}} | +<kbd>{{{5|}}}</kbd> }}<!--
-->{{#if: {{{5|}}} | +<kbd>{{{5|}}}</kbd> }}<!--
--></includeonly><noinclude><!--
-->{{#if: {{{6|}}} | +<kbd>{{{6|}}}</kbd> }}
-->This is a template to illustrate keys and keystrokes on a computer keyboard. With additional parameters, a single template can be used to illustrate a combination of multiple keystrokes. For now, up to 5 keystrokes can be recorded in a single parameter.
| ds  = {{#if: {{{2|}}} | <span class="ds-button">{{{2|}}}</span> }}<!--
-->{{#if: {{{3|}}} | +<span class="ds-button">{{{3|}}}</span> }}<!--
-->{{#if: {{{4|}}} | +<span class="ds-button">{{{4|}}}</span> }}<!--
-->{{#if: {{{5|}}} | +<span class="ds-button">{{{5|}}}</span> }}<!--
-->{{#if: {{{6|}}} | +<span class="ds-button">{{{6|}}}</span> }}
}}</includeonly><!--
--><noinclude>This is a template to illustrate keys and keystrokes on a computer keyboard. With additional parameters, a single template can be used to illustrate a combination of multiple keystrokes. For now, up to 5 keystrokes can be recorded in a single parameter.


== Syntax ==
== Syntax ==
'''<nowiki>{{button</nowiki>''' | ''key'' | ''key'' | ''key'' | ''key'' | ''key'' '''}}'''
'''<nowiki>{{button</nowiki>''' | ''key'' | ''key'' | ''key'' | ''key'' | ''key'' '''}}'''
[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 14:10, 20 September 2021

This is a template to illustrate keys and keystrokes on a computer keyboard. With additional parameters, a single template can be used to illustrate a combination of multiple keystrokes. For now, up to 5 keystrokes can be recorded in a single parameter.

Syntax

{{button | key | key | key | key | key }}