Difference between revisions of "Template:Key press"
Jump to navigation
Jump to search
(Larger buttons. Experimental.) |
m (Border too thin, make it medium again.) |
||
Line 1: | Line 1: | ||
− | <includeonly><kbd style="display:inline-block;border: | + | <includeonly><kbd style="display:inline-block;border:medium {{{border|{{{2|outset}}}}}} gray;padding:0 .3em;white-space:nowrap;overflow:hidden;font-family:sans-serif;line-height:1.3em;margin:-.2em auto;vertical-align:text-bottom">{{{key|{{{1|=}}}}}}</kbd></includeonly><noinclude><!-- Do not put any white space, including new line, between the end tag of includeonly and start tag of noinclude, else pages will break. |
-->{{Documentation}} | -->{{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 23:44, 9 February 2024
A simple template that makes it easier to see that a keyboard key is involved. Use {{key combo}} if two or more keys need to be pressed at the same time instead of this template.
Usage[edit]
{{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 =.
Common keys[edit]
For ease of use and consistency throughout pages, the code for some common multi-letter keys is provided here, ready to be copied and pasted into articles. Symbols rely on UTF-8 support by the browser and a font that contains the glyph, so for best compatibility, the text-only version of the code can be recommended for use in most articles. Not every key has a corresponding symbol.
Key | Text | Symbol | Symbol with text | Text with symbol |
---|---|---|---|---|
Left |
|
|
|
|
Up |
|
|
|
|
Right |
|
|
|
|
Down |
|
|
|
|
Key | Text | Symbol | Symbol with text | Text with symbol |
---|---|---|---|---|
Shift |
|
|
|
|
Control |
|
|
|
|
Command |
|
|
|
|
Option |
|
|
|
|
Alt |
|
|||
Alt Graph |
|
Key | Text | Symbol | Symbol with text | Text with symbol |
---|---|---|---|---|
Space |
|
|
|
|
Enter |
|
|
|
|
Tab |
|
|
|
|
Escape |
|
|
|
|
The above documentation is transcluded from Template:Key press/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |