Difference between revisions of "Template:Key press"

From Zero-K
Jump to navigation Jump to search
(Separate tables to find information more easily at a glance.)
m
Line 104: Line 104:
 
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &amp;darr;}}</nowiki></code>
 
:<code><nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Down &amp;darr;}}</nowiki></code>
 
|}
 
|}
 
  
 
{| class="wikitable sortable" style="margin-left:auto; margin-right:auto"
 
{| class="wikitable sortable" style="margin-left:auto; margin-right:auto"

Revision as of 16:08, 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|&times;}} 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.

Cursor control
Key Text Symbol Symbol with text Text with symbol
Left
Left
{{Key press|Left}}
{{Key press|←}}
{{Key press|&#8592;}}
{{Key press|&larr;}}
← Left
{{Key press|← Left}}
{{Key press|&#8592; Left}}
{{Key press|&larr; Left}}
Left ←
{{Key press|Left ←}}
{{Key press|Left &#8592;}}
{{Key press|Left &larr;}}
Up
Up
{{Key press|Up}}
{{Key press|↑}}
{{Key press|&#8593;}}
{{Key press|&uarr;}}
↑ Up
{{Key press|↑ Up}}
{{Key press|&#8593; Up}}
{{Key press|&uarr; Up}}
Up ↑
{{Key press|Up ↑}}
{{Key press|Up &#8593;}}
{{Key press|Up &uarr;}}
Right
Right
{{Key press|Right}}
{{Key press|→}}
{{Key press|&#8594;}}
{{Key press|&rarr;}}
→ Right
{{Key press|→ Right}}
{{Key press|&#8594; Right}}
{{Key press|&rarr; Right}}
Right →
{{Key press|Right →}}
{{Key press|Right &#8594;}}
{{Key press|Right &rarr;}}
Down
Down
{{Key press|Down}}
{{Key press|↓}}
{{Key press|&#8595;}}
{{Key press|&darr;}}
↓ Down
{{Key press|↓ Down}}
{{Key press|&#8595; Down}}
{{Key press|&darr; Down}}
Down ↓
{{Key press|Down ↓}}
{{Key press|Down &#8595;}}
{{Key press|Down &darr;}}
Modifier keys
Key Text Symbol Symbol with text Text with symbol
Shift
Shift
{{Key press|Shift}}
{{Key press|⇧}}
{{Key press|&#8679;}}
⇧ Shift
{{Key press|⇧ Shift}}
{{Key press|&#8679; Shift}}
Shift ⇧
{{Key press|Shift ⇧}}
{{Key press|Shift &#8679;}}
Control
Ctrl
{{Key press|Ctrl}}
^
{{Key press|^}}
^ Ctrl
{{Key press|^ Ctrl}}
Ctrl ^
{{Key press|Ctrl ^}}
Command
Command
{{Key press|Command}}
{{Key press|⌘}}
{{Key press|&#8984;}}
⌘ Command
{{Key press|⌘ Command}}
{{Key press|&#8984; Command}}
Command ⌘
{{Key press|Command ⌘}}
{{Key press|Command &#8984;}}
Option
Option
{{Key press|Option}}
{{Key press|⌥}}
{{Key press|&#8997;}}
⌥ Option
{{Key press|⌥ Option}}
{{Key press|&#8997; Option}}
Option ⌥
{{Key press|Option ⌥}}
{{Key press|Option &#8997;}}
Alt
Alt
{{Key press|Alt}}
Alt Graph
AltGr
{{Key press|AltGr}}
Other often-used keys
Key Text Symbol Symbol with text Text with symbol
Space
Space
{{Key press|Space}}
{{Key press|⎵}}
{{Key press|&#9141;}}
⎵ Space
{{Key press|⎵ Space}}
{{Key press|&#9141; Space}}
Space ⎵
{{Key press|Space ⎵}}
{{Key press|Space &#9141;}}
Enter
Enter
{{Key press|Enter}}
{{Key press|↵}}
{{Key press|&#8629;}}
{{Key press|&crarr;}}
{{Key press|⌤}}
{{Key press|&#8996;}}
↵ Enter
{{Key press|↵ Enter}}
{{Key press|&#8629; Enter}}
{{Key press|&crarr; Enter}}
⌤ Enter
{{Key press|⌤ Enter}}
{{Key press|&#8996; Enter}}
Enter ↵
{{Key press|Enter ↵}}
{{Key press|Enter &#8629;}}
{{Key press|Enter &crarr;}}
Enter ⌤
{{Key press|Enter ⌤}}
{{Key press|Enter &#8996;}}
Tab
Tab
{{Key press|Tab}}
{{Key press|↹}}
{{Key press|&#8633;}}
(better, but less compatible)
{{Key press|⭾}}
{{Key press|&#11134;}}
↹ Tab
{{Key press|↹ Tab}}
{{Key press|&#8633; Tab}}
⭾ Tab
{{Key press|⭾ Tab}}
{{Key press|&#11134; Tab}}
Tab ↹
{{Key press|Tab ↹}}
{{Key press|Tab &#8633;}}
Tab ⭾
{{Key press|Tab ⭾}}
{{Key press|Tab &#11134;}}
Escape
Esc
{{Key press|Esc}}
{{Key press|⎋}}
{{Key press|&#9099;}}
⎋ Esc
{{Key press|⎋ Esc}}
{{Key press|&#9099; Esc}}
Esc ⎋
{{Key press|Esc ⎋}}
{{Key press|Esc &#9099;}}