Difference between revisions of "Template:Key press"
Jump to navigation
Jump to search
m (This template is a quick and dirty one, needs improvement.) |
(Uses sans-serif fonts for keys now (to see if it looks better than proportional).) |
||
Line 1: | Line 1: | ||
− | <includeonly><kbd style="display:inline-block;border:medium {{{border|{{{2|outset}}}}}} gray;padding:0 .3em;line-height:1em>{{{key|{{{1|=}}}}}}</kbd></includeonly><noinclude>A simple template that makes it easier to see that a keyboard key is involved. | + | <includeonly><kbd style="display:inline-block;border:medium {{{border|{{{2|outset}}}}}} gray;padding:0 .3em;line-height:1em;white-space:nowrap;font-family:sans-serif>{{{key|{{{1|=}}}}}}</kbd></includeonly><noinclude>A simple template that makes it easier to see that a keyboard key is involved. |
==Usage== | ==Usage== |
Revision as of 16:03, 13 June 2020
A simple template that makes it easier to see that a keyboard key is involved.
Usage
{{Key press|key|border style}}
- key is the literal name of the key to be pressed. For F4, for example, the syntax is
{{Key press|F4}}
. This results in the following: F4 - HTML character entities are allowed. For example, to display the multiplication symbol, this works:
{{Key press|×}}
and results in ×. - To display a pressed key, add inset border style like this:
{{Key press|F4|inset}}
and the key will appear to be pressed: F4. - The key and border parameters can be reversed, but then their names need to be specified:
{{Key press|border=inset|key=F4}}
will become F4 - Forgetting to specify a key will default to the equals sign:
{{Key press}}
becomes =.