The Style Guide has recently been rewritten. Please take a moment to review the new guidelines.
(add show_set and directional) |
(add it to lc) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude><div class="center"></noinclude>{{#ifeq:{{{2|}}}|show_set||<span class="explain" tabindex="0" title="}}{{#switch: {{lc:{{{1<noinclude>|interact</noinclude>}}}}} | <noinclude><div class="center"></noinclude>{{safesubst:<noinclude/>#ifeq:{{{2|}}}|show_set||<span class="explain" tabindex="0" title="}}{{safesubst:<noinclude/>#switch: {{safesubst:<noinclude/>lc:{{{1<noinclude>|interact</noinclude>}}}}} | ||
|interact|action = Z / Space / Enter | |interact|action = Z / Space / Enter | ||
|menu = X / C / V / B / N / Esc / Numpad 0 | |menu = X / C / V / B / N / Esc / Numpad 0 | ||
Line 8: | Line 8: | ||
|directional = Arrow keys / Numpad 2 4 6 8 / HJKL | |directional = Arrow keys / Numpad 2 4 6 8 / HJKL | ||
|#default = No alternative keys | |#default = No alternative keys | ||
}}{{#ifeq:{{{2|}}}|show_set||">{{{2|{{{1<noinclude>|interact</noinclude>}}}}}}</span>}}<noinclude></div> | }}{{safesubst:<noinclude/>#ifeq:{{{2|}}}|show_set||">{{{2|{{{1<noinclude>|interact</noinclude>}}}}}}</span>}}<noinclude></div> | ||
Use this template for controls to include a tooltip of keys that map to that control by default. | Use this template for controls to include a tooltip of keys that map to that control by default. |
Latest revision as of 05:29, 22 March 2025
Use this template for controls to include a tooltip of keys that map to that control by default.
For example, instead of writing:
Hold X to exit the screen.
You should instead write:
Hold the {{control|menu}} key to exit the screen.
Which would present:
Hold the menu key to exit the screen.
Alternatively, you could write:
Hold the {{control|menu|menu key}} to exit the screen.
Which would present:
Hold the menu key to exit the screen.
The purpose of this template is to avoid suggesting specific keys when in actuality a range of keys can be used.
Technically it's still possible to put a specific key in the second parameter and display something like "Hold esc", but this is more confusing.
The special value |2 = show_set
outputs the keys as text instead of in a tooltip:
Use the {{control|directional|show_set}} keys to move.
Use the Arrow keys / Numpad 2 4 6 8 / HJKL keys to move.