Template:Keypress
From FORwiki
(Difference between revisions)
Line 3: | Line 3: | ||
-->{{#if:{{{3|}}}| +{{keypress/core| {{{3}}} }} }}<!-- | -->{{#if:{{{3|}}}| +{{keypress/core| {{{3}}} }} }}<!-- | ||
-->{{#if:{{{4|}}}| +{{keypress/core| {{{4}}} }} }}<!-- | -->{{#if:{{{4|}}}| +{{keypress/core| {{{4}}} }} }}<!-- | ||
- | -->{{#if:{{{5|}}}| +{{keypress/core| {{{5}}} }} }} | + | -->{{#if:{{{5|}}}| +{{keypress/core| {{{5}}} }} }}<noinclude> |
- | + | ||
- | <noinclude> | + | |
- | + | ||
{{documentation}} | {{documentation}} | ||
<!-- ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE --> | <!-- ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE --> | ||
- | |||
- | |||
[[Category:Templates]] | [[Category:Templates]] | ||
</noinclude> | </noinclude> |
Current revision as of 00:25, 14 January 2010
{{{1}}}
[edit] [ ]
Template documentation

This is the {{keypress}} template.
It can be used to illustrate keystrokes.
Example:
{{keypress|A}}
produces A
If there is an article about the key you can wikilink the key's name like any other wiki text. Like this:
{{keypress|Alt}}
produces Alt
To illustrate keystroke combinations, just use extra parameters:
{{keypress|[[Alt key|Alt]]|P}}
produces Alt
+P
{{keypress|[[Ctrl]]|Alt|Del}}
produces Ctrl
+Alt+Del
Key symbols
Some key names have a fitting unicode character. This template automatically adds such "icons" to the following key names:
{{keypress|Shift}}
produces ⇧ Shift
{{keypress|Enter}}
produces ↵ Enter
{{keypress|Cmd}}
produces ⌘ Cmd
{{keypress|Opt}}
produces ⌥ Opt
{{keypress|Tab}}
produces Tab ⇆
{{keypress|Backspace}}
produces ← Backspace
This template has no special handling for the arrow key symbols. But here is how we usually code the arrow keys, so you can copy and paste the code for them:
{{keypress|←}}
produces ←
{{keypress|↑}}
produces ↑
{{keypress|↓}}
produces ↓
{{keypress|→}}
produces →