Template:Key press: Difference between revisions
(Added documentation and additional key options.) |
m (Added third variable.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<span style="background-color: #f9f9f9; background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee); border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); padding: 0.1em 0.3em; font-size: 0.85em;">{{#switch: {{{1}}} | <span style="background-color: #f9f9f9; background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee); border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); padding: 0.1em 0.3em; font-size: 0.85em; font-weight: normal;">{{#switch:{{{1}}} | ||
| Enter = ↵ Enter | | Enter = ↵ Enter | ||
| Shift = ⇧ Shift | | Shift = ⇧ Shift | ||
| Tab = Tab ↹ | | Tab = Tab ↹ | ||
| Win = ⊞ Win | |||
| Up = ↑ | | Up = ↑ | ||
| Down = ↓ | | Down = ↓ | ||
Line 8: | Line 9: | ||
| Right = → | | Right = → | ||
| {{{1}}} | | {{{1}}} | ||
}}</span><noinclude> | }}</span>{{#if:{{{2|}}}|+<span style="background-color: #f9f9f9; background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee); border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); padding: 0.1em 0.3em; font-size: 0.85em; font-weight: normal;">{{#switch:{{{2}}} | ||
| Enter = ↵ Enter | |||
| Shift = ⇧ Shift | |||
| Tab = Tab ↹ | |||
| Win = ⊞ Win | |||
| Up = ↑ | |||
| Down = ↓ | |||
| Left = ← | |||
| Right = → | |||
| {{{2}}} | |||
}}</span>|}}{{#if:{{{3|}}}|+<span style="background-color: #f9f9f9; background-image: linear-gradient(to bottom, #eee, #f9f9f9, #eee); border: 1px solid #aaa; border-radius: 0.2em; box-shadow: 0.1em 0.1em 0.2em rgba(0,0,0,0.1); padding: 0.1em 0.3em; font-size: 0.85em; font-weight: normal;">{{#switch:{{{3}}} | |||
| Enter = ↵ Enter | |||
| Shift = ⇧ Shift | |||
| Tab = Tab ↹ | |||
| Win = ⊞ Win | |||
| Up = ↑ | |||
| Down = ↓ | |||
| Left = ← | |||
| Right = → | |||
| {{{3}}} | |||
}}</span>|}}<noinclude> | |||
==Documentation== | ==Documentation== | ||
This is the {{tl|key press}} template, primarily designed to illustrate keys and keystrokes on a computer keyboard. | This is the {{tl|key press}} template, primarily designed to illustrate keys and keystrokes on a computer keyboard. | ||
Line 16: | Line 37: | ||
{{code|<nowiki>{{key press|A}}</nowiki>}} → {{key press|A}} | {{code|<nowiki>{{key press|A}}</nowiki>}} → {{key press|A}} | ||
{{code|<nowiki>{{key press|Ctrl|A}}</nowiki>}} → {{key press|Crtl|A}} | |||
{{code|<nowiki>{{key press|Ctrl|Alt|Delete}}</nowiki>}} → {{key press|Crtl|Alt|Delete}} | |||
===Key symbols=== | ===Key symbols=== | ||
Some key names have a fitting Unicode character. This template automatically adds such | Some key names have a fitting Unicode character (or a close approximation thereof). This template automatically adds such “icons” to the following key names: | ||
: {{code|<nowiki>{{key press|Enter}}</nowiki>}} → {{key press|Enter}} | : {{code|<nowiki>{{key press|Enter}}</nowiki>}} → {{key press|Enter}} | ||
: {{code|<nowiki>{{key press|Shift}}</nowiki>}} → {{key press|Shift}} | : {{code|<nowiki>{{key press|Shift}}</nowiki>}} → {{key press|Shift}} | ||
: {{code|<nowiki>{{key press|Tab}}</nowiki>}} → {{key press|Tab}} | : {{code|<nowiki>{{key press|Tab}}</nowiki>}} → {{key press|Tab}} | ||
: {{code|<nowiki>{{key press|Win}}</nowiki>}} → {{key press|Win}} | |||
: {{code|<nowiki>{{key press|Up}}</nowiki>}} → {{key press|Up}} | : {{code|<nowiki>{{key press|Up}}</nowiki>}} → {{key press|Up}} | ||
: {{code|<nowiki>{{key press|Down}}</nowiki>}} → {{key press|Down}} | : {{code|<nowiki>{{key press|Down}}</nowiki>}} → {{key press|Down}} |
Latest revision as of 17:03, 22 October 2018
{{{1}}}
Documentation
This is the {{key press}} template, primarily designed to illustrate keys and keystrokes on a computer keyboard.
Example:
{{key press|A}}
→ A
{{key press|Ctrl|A}}
→ Crtl+A
{{key press|Ctrl|Alt|Delete}}
→ Crtl+Alt+Delete
Key symbols
Some key names have a fitting Unicode character (or a close approximation thereof). This template automatically adds such “icons” to the following key names:
{{key press|Enter}}
→ ↵ Enter{{key press|Shift}}
→ ⇧ Shift{{key press|Tab}}
→ Tab ↹{{key press|Win}}
→ ⊞ Win{{key press|Up}}
→ ↑{{key press|Down}}
→ ↓{{key press|Left}}
→ ←{{key press|Right}}
→ →