Template:Key press: Difference between revisions
Jump to navigation
Jump to search
(Use Template:Key press/core for improved rendering, extend to 10 keys) |
(+- doc: +- Using templates Obr and Cbr, + Example of table using the "keytable" CSS style class) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
== Usage == | == Usage == | ||
{{obr}}'''key press'''{{!}}''key''{{!}}''key''{{!}}''key''{{!}}''key''{{cbr}} | |||
For upper-case letters please use a combination of the shift key and an upper-case letter (<code | For upper-case letters please use a combination of the shift key and an upper-case letter (<code>{{obr}}key press{{!}}Shift{{!}}C{{cbr}}</code>) and for lower-case letters please use an upper-case letter (<code><nowiki>{{</nowiki>key press<nowiki>|</nowiki>C<nowiki>}}</nowiki></code>). | ||
== Examples == | == Examples == | ||
{{obr}}key press{{!}}G{{cbr}} and {{obr}}key press{{!}}Shift{{!}}G{{cbr}} will retract and extend the landing gear. | |||
{{key press|G}} and {{key press|Shift|G}} will retract and extend the landing gear. | {{key press|G}} and {{key press|Shift|G}} will retract and extend the landing gear. | ||
<nowiki>{| class="keytable" | |||
! Key | |||
! Function | |||
|- | |||
| {{key press|Shift|C}} | |||
| Catapult launch command | |||
|- | |||
| {{key press|Shift|L}} | |||
| Carrier launch-bar engage | |||
|- | |||
| {{key press|O}} / {{key press|Shift|O}} | |||
| Hook up/down | |||
|- | |||
| {{key press|Ctrl|B}} | |||
| Toggle airbrakes | |||
|- | |||
| {{key press|Ctrl|K}} | |||
| Toggle spoilers | |||
|}</nowiki> | |||
{{{!}} class="keytable" | |||
! Key | |||
! Function | |||
{{!-}} | |||
{{!}} {{key press|Shift|C}} | |||
{{!}} Catapult launch command | |||
{{!-}} | |||
{{!}} {{key press|Shift|L}} | |||
{{!}} Carrier launch-bar engage | |||
{{!-}} | |||
{{!}} {{key press|O}} / {{key press|Shift|O}} | |||
{{!}} Hook up/down | |||
{{!-}} | |||
{{!}} {{key press|Ctrl|B}} | |||
{{!}} Toggle airbrakes | |||
{{!-}} | |||
{{!}} {{key press|Ctrl|K}} | |||
{{!}} Toggle spoilers | |||
{{!}}} | |||
== Known issues == | == Known issues == | ||
Line 29: | Line 70: | ||
* 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. | ||
[[Category:Formatting templates]] | |||
[[Category: | |||
}} | }} | ||
</noinclude> | </noinclude> |
Latest revision as of 12:37, 22 August 2019
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.
{| class="keytable" ! Key ! Function |- | {{key press|Shift|C}} | Catapult launch command |- | {{key press|Shift|L}} | Carrier launch-bar engage |- | {{key press|O}} / {{key press|Shift|O}} | Hook up/down |- | {{key press|Ctrl|B}} | Toggle airbrakes |- | {{key press|Ctrl|K}} | Toggle spoilers |}
Key | Function |
---|---|
⇧ Shift+C | Catapult launch command |
⇧ Shift+L | Carrier launch-bar engage |
O / ⇧ Shift+O | Hook up/down |
Ctrl+B | Toggle airbrakes |
Ctrl+K | Toggle spoilers |
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.