Dota 2 Wiki
Advertisement
Dota 2 Wiki
20,249
pages

Documentation for Template:Key press [ view | edit | purge ]

Lua logo.svg
▶️ Swapsies!
This template uses Lua.
Its code can be found under Module:Key press.


Usage

Below are examples and possible usage of this template:

For Dota 2

To show mechanics or gameplay controls:

Other Key-based templates:

Symbols

  • Settings Off by default , On by default .

Keystroke Combinations

To illustrate keystroke combinations, just use extra parameters:

{{Key press|A}}A
{{Key press|Alt|P}}Alt+P
{{Key press|Ctrl|Alt|Del}}Ctrl+Alt+Del

As lower-case alphabetic characters a–z do not appear on most keyboards, they should not be used as parameters.

When you feed several key names to this template, it adds a "+" (or whatever the contents of the optional chain parameter) with no spaces around. This means it won't line wrap. But when you show key combinations for instance in a table that might cause items to be too wide. Instead manually build the key combination with spaces around the "+" so it can line wrap:

{{Key press|Ctrl}} + {{Key press|Alt}} + {{Key press|Del}}Ctrl + Alt + Del
{{Key press|Ctrl|Alt|Del|chain= + }}Ctrl + Alt + Del
{{Key press|Alt|0}}{{Key press|1|7|7|chain=}}Alt+0177

Mouse

{{Key press|mouseleft}}Keyboard White Mouse Left.png Left Click
{{Key press|mouseright}}Keyboard White Mouse Right.png Right Click
{{Key press|mousemid}}Keyboard White Mouse Middle.png Middle Click

Combinations

{{Key press|Alt|mouseleft}}Alt+Keyboard White Mouse Left.png Left Click

Wiki Markup Characters

Some wiki markup characters, like the pipe symbol, the semicolon and the equals sign, need to be entered using the !, ; and = templates or as an HTML entity |, &#59;, = respectively:

See Also

Advertisement