Template:Key press: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (moved Template to Template:Key press: I definitively got that on the wrong page.)
(Showing the output using the template +sections: Known issues, To do)
Line 8: Line 8:
  <nowiki>{{</nowiki>'''key press'''<nowiki>|</nowiki>''caption''<nowiki>}}</nowiki>
  <nowiki>{{</nowiki>'''key press'''<nowiki>|</nowiki>''caption''<nowiki>}}</nowiki>


In some cases workarounds will be required. One of them are for example the caption <span style="border: 1px solid #777; padding: 1px 3px; font-family: inherit; font-size: 0.85em;">{{!}}</span> which would require you to insert <code><nowiki>{{!}}</nowiki></code> instead of <code>{{!}}</code>, since using a "{{!}}" inside a template will break it.
In some cases workarounds will be required. One of them are for example the caption {{key press|{{!}}}} which would require you to insert <code><nowiki>{{!}}</nowiki></code> instead of <code>{{!}}</code>, since using a "{{!}}" inside a template will break it.
== Examples ==
== Examples ==
  The key combination <nowiki>{{</nowiki>key press<nowiki>|</nowiki>Ctrl<nowiki>}}</nowiki>+<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Alt<nowiki>}}</nowiki>+<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Del<nowiki>}}</nowiki> is sometimes called "The Vulcan neck-pinch".
  The key combination <nowiki>{{</nowiki>key press<nowiki>|</nowiki>Ctrl<nowiki>}}</nowiki>+<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Alt<nowiki>}}</nowiki>+<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Del<nowiki>}}</nowiki> is sometimes called "The Vulcan neck-pinch".


The key combination <span style="border: 1px solid #777; padding: 1px 3px; font-family: inherit; font-size: 0.85em;">Ctrl</span>+<span style="border: 1px solid #777; padding: 1px 3px; font-family: inherit; font-size: 0.85em;">Alt</span>+<span style="border: 1px solid #777; padding: 1px 3px; font-family: inherit; font-size: 0.85em;">Del</span> is sometimes called "The Vulcan neck-pinch".
The key combination {{key press|Ctrl}}+{{key press|Alt}}+{{key press|Del}} is sometimes called "The Vulcan neck-pinch".
 
== Known issues ==
This template currently wraps, so that for example {{key press|Page up}} may end up having two half boxes with "Page" at the end of one line and "up" at the beginning of the following line.
 
== To do ==
Add <s>functionality</s> template magic so that:
<nowiki>{{</nowiki>key press<nowiki>|</nowiki>Ctrl<nowiki>|</nowiki>Alt<nowiki>|</nowiki>Del<nowiki>}}</nowiki>, <nowiki>{{</nowiki>key press<nowiki>|</nowiki>Shift<nowiki>|</nowiki>A<nowiki>}}</nowiki> and <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|Ctrl}}+{{key press|Alt}}+{{key press|Del}}, {{key press|Shift}}+{{key press|A}} and {{key press|Alt}}+{{key press|0}}{{key press|1}}{{key press|7}}{{key press|6}} (the last ''might'' not be possible.


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

Revision as of 12:55, 27 April 2013

{{{1}}}

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

Goal

This template inserts an inline key cap with a key caption.

Usage

{{key press|caption}}

In some cases workarounds will be required. One of them are for example the caption | which would require you to insert {{!}} instead of |, since using a "|" inside a template will break it.

Examples

The key combination {{key press|Ctrl}}+{{key press|Alt}}+{{key press|Del}} is sometimes called "The Vulcan neck-pinch".

The key combination Ctrl+Alt+Del is sometimes called "The Vulcan neck-pinch".

Known issues

This template currently wraps, so that for example Page up may end up having two half boxes with "Page" at the end of one line and "up" at the beginning of the following line.

To do

Add functionality template magic so that:

{{key press|Ctrl|Alt|Del}}, {{key press|Shift|A}} and {{key press|Alt|0|1|7|6}}

Would render Ctrl+Alt+Del, Shift+A and Alt+0176 (the last might not be possible.