Difference between revisions of "Template:Key press"
Jump to navigation
Jump to search
(Added cursor control keys, changed table header color to make sorting arrows visible (this probably needs to be perma-fixed in places where only admins can go). Now using a variable for template name.) |
(Added tab key, removed wrong arrow (for Shift).) |
||
Line 29: | Line 29: | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⇧}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⇧}}</nowiki></code> | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#8679;}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#8679;}}</nowiki></code> | ||
− | |||
| | | | ||
;{{{{BASEPAGENAME}}|⇧ Shift}} | ;{{{{BASEPAGENAME}}|⇧ Shift}} | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⇧ Shift}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⇧ Shift}}</nowiki></code> | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#8679; Shift}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#8679; Shift}}</nowiki></code> | ||
− | |||
| | | | ||
;{{{{BASEPAGENAME}}|Shift ⇧}} | ;{{{{BASEPAGENAME}}|Shift ⇧}} | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Shift ⇧}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Shift ⇧}}</nowiki></code> | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Shift &#8679;}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Shift &#8679;}}</nowiki></code> | ||
− | |||
|- style="vertical-align:top" | |- style="vertical-align:top" | ||
Line 241: | Line 238: | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &#8595;}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &#8595;}}</nowiki></code> | ||
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &darr;}}</nowiki></code> | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &darr;}}</nowiki></code> | ||
+ | |||
+ | |- style="vertical-align:top" | ||
+ | ! scope="row" style="text-align:left"|Tab | ||
+ | | | ||
+ | ;{{{{BASEPAGENAME}}|Tab}} | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Tab}}</nowiki></code> | ||
+ | | | ||
+ | ;{{{{BASEPAGENAME}}|⭾}} | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⭾}}</nowiki></code> | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#11134;}}</nowiki></code> | ||
+ | | | ||
+ | ;{{{{BASEPAGENAME}}|⭾ Tab}} | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|⭾ Tab}}</nowiki></code> | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|&#11134; Tab}}</nowiki></code> | ||
+ | | | ||
+ | ;{{{{BASEPAGENAME}}|Tab ⭾}} | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Tab ⭾}}</nowiki></code> | ||
+ | :<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Tab &#11134;}}</nowiki></code> | ||
|} | |} | ||
− | <!--TO DO: Add Super, Menu, BS, Esc, PrtScr, ScLock, CapsLock, Pause, NumLock, Ins, Del, Home, PgUp, PgDn, ?Home?, ?End?.--> | + | <!--TO DO: Add ?Super?, ?Menu?, BS, Esc, PrtScr, ScLock, CapsLock, Pause, NumLock, Ins, Del, Home, PgUp, PgDn, ?Home?, ?End?.--> |
</noinclude> | </noinclude> |
Revision as of 14:41, 16 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 =.
Common keys
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 |
---|---|---|---|---|
Shift |
|
|
|
|
Control |
|
|
|
|
Command |
|
|
|
|
Option |
|
|
|
|
Alt |
|
|||
Alt Graph |
|
|||
Space |
|
|
|
|
Enter |
|
|
|
|
Left |
|
|
|
|
Up |
|
|
|
|
Right |
|
|
|
|
Down |
|
|
|
|
Tab |
|
|
|
|