Template:Keypress/doc: Difference between revisions
From Vintage Story Wiki
(Marked this version for translation) |
(haha get fucked extra params) |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
This template allows users to use in-line "keypress" formatting, for demonstrating which keyboard key(s) a user should press. There is currently no special key for mouse clicks. | This template allows users to use in-line "keypress" formatting, for demonstrating which keyboard key(s) a user should press. There is currently no special key for mouse clicks. The CSS and overall style is taken from [https://en.wikipedia.org/wiki/Template:Key_press English Wikipedia's Key press template], albeit currently without the Lua module. | ||
== Usage == <!--T:2--> | == Usage == <!--T:2--> | ||
<!--T:3--> | <!--T:3--> | ||
The template can be used for regular keys by inserting the following: <code><nowiki>{{Keypress|W}}</nowiki></code>. The first parameter is the display text. | |||
<pre> | <pre> | ||
{{Keypress | {{Keypress | ||
|Display text (must be first!) | |Display text (must be first!) | ||
}}</pre> | }}</pre> | ||
Line 22: | Line 20: | ||
! Parameters !! Description !! Type !! Required | ! Parameters !! Description !! Type !! Required | ||
|- | |- | ||
| 1 || The display text of the key. | | 1 || The display text of the key. || any || yes | ||
|} | |} | ||
Line 34: | Line 28: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Key type !! Template text !! Result | ! Key type !! Template text !! Result | ||
|- | |||
| Regular key || <code><nowiki>{{keypress|e}}</nowiki></code> || {{keypress|e}} | |||
|- | |- | ||
| | | Modifier (Shift, Ctrl, Alt) || <code><nowiki>{{keypress|CTRL}}</nowiki></code> || {{keypress|CTRL}} | ||
|- | |- | ||
| | | Spacebar || <code><nowiki>{{keypress|Space}}</nowiki></code> || {{keypress|Space}} | ||
|- | |- | ||
| | | Function keys (F1-12, Esc) || <code><nowiki>{{Keypress|F5}}</nowiki></code> || {{Keypress|F5}} | ||
|- | |- | ||
| | | Arbitrary symbols and strings || <code><nowiki>{{keypress|⇧ Shift+⊞ Win+≣ Menu}}</nowiki></code>|| {{keypress|⇧ Shift+⊞ Win+≣ Menu}} | ||
|} | |} | ||
</translate> | </translate> |
Latest revision as of 22:16, 6 August 2023
This template allows users to use in-line "keypress" formatting, for demonstrating which keyboard key(s) a user should press. There is currently no special key for mouse clicks. The CSS and overall style is taken from English Wikipedia's Key press template, albeit currently without the Lua module.
Usage
The template can be used for regular keys by inserting the following: {{Keypress|W}}
. The first parameter is the display text.
{{Keypress |Display text (must be first!) }}
Parameters
Parameters | Description | Type | Required |
---|---|---|---|
1 | The display text of the key. | any | yes |
Examples
Key type | Template text | Result |
---|---|---|
Regular key | {{keypress|e}} |
e |
Modifier (Shift, Ctrl, Alt) | {{keypress|CTRL}} |
CTRL |
Spacebar | {{keypress|Space}} |
Space |
Function keys (F1-12, Esc) | {{Keypress|F5}} |
F5 |
Arbitrary symbols and strings | {{keypress|⇧ Shift+⊞ Win+≣ Menu}} |
⇧ Shift+⊞ Win+≣ Menu |