Template:Key press: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Use Template:Key press/core for improved rendering, extend to 10 keys)
(Can be done with {{key press|Alt}}+{{key press|0|1|7|6|chain=}} now)
Line 28: Line 28:


* If a line breaks right before the template the leftmost key border stays on that line.
* If a line breaks right before the template the leftmost key border stays on that line.
== To do ==
Add <s>functionality</s> template magic so that:
<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Alt<nowiki>|</nowiki>0<nowiki>|</nowiki>1<nowiki>|</nowiki>7<nowiki>|</nowiki>6<nowiki>}}</nowiki>
Would render {{key press|Alt}}+{{key press|0}}{{key press|1}}{{key press|7}}{{key press|6}} (''Might'' not be possible).


[[Category:Templates]]
[[Category:Templates]]
}}
}}
</noinclude>
</noinclude>

Revision as of 21:49, 19 August 2014

The following template description is not displayed when the template is inserted in an article.

Goal

This template is used to illustrate key presses. Optionally, a combination of up to ten keys can be used.

Usage

{{key press|key|key|key|key}}

For upper-case letters please use a combination of the shift key and an upper-case letter ({{key press|Shift|C}}) and for lower-case letters please use an upper-case letter ({{key press|C}}).

Examples

{{key press|G}} and {{key press|Shift|G}} will retract and extend the landing gear.

G and Shift+G will retract and extend the landing gear.

Known issues

  • For some captions workarounds will be required. Two of them are for example the captions | and = which would require you to insert {{!}} or {{=}} instead of | or =, since using a "|" or "=" inside a template will break it.
  • If a line breaks right before the template the leftmost key border stays on that line.