Template:Key press: Difference between revisions
Jump to navigation
Jump to search
(Should now in be safe from line breaks most cases; etc) |
m (typo) |
||
Line 1: | Line 1: | ||
<span style="white-space: nowrap;><!-- | <span style="white-space: nowrap;"><!-- | ||
--><span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{1|Key}}}</span><!-- | --><span style="border: 1px solid #777; padding: 1px 3px; background: #eee; font-family: inherit; font-size: 0.85em; text-transform: none;">{{{1|Key}}}</span><!-- | ||
-->{{#if: {{{2|}}} | -->{{#if: {{{2|}}} |
Revision as of 20:18, 28 May 2014
Key
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 four 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.
To do
Add functionality template magic so that:
{{key press|Alt|0|1|7|6}}
Would render Alt+0176 (Might not be possible).