Difference between revisions of "Template:Key press/doc"

From Summertime Saga Wiki
Jump to: navigation, search
m (Wiki markup characters)
m (See also)
Line 73: Line 73:
  
 
* {{tlx|summertimesaga button}} – produces a visual effect for ''Summertime Saga'' interface elements.
 
* {{tlx|summertimesaga button}} – produces a visual effect for ''Summertime Saga'' interface elements.
* {{tlx|kbd}} – indicates user input (of any kind) without making it look like keys or buttons
+
* {{tlx|kbd}} – indicates user input (of any kind) without making it look like keys or buttons.
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
[[Category:Templates documentation]]
 
[[Category:Templates documentation]]

Revision as of 22:23, 10 July 2020

This is the Template:Tl template primarily designed to illustrate keys and keystrokes on a computer keyboard. With additional parameters, a single template can even illustrate a combination of multiple simultaneous keystrokes. A sequence of keystrokes, on the other hand, need to be demonstrated with separate templates.

Example

Template:TlcA

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

Keystroke combinations

To illustrate keystroke combinations, just use extra parameters:

Template:Tlc produces Alt+P
Template:Tlc produces Ctrl+Alt+Del

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:

Template:Tlc + Template:Tlc + Template:Tlc produces Ctrl + Alt + Del
Template:Tlc produces Ctrl + Alt + Del

To illustrate sequences where all keys do not need to be pressed simultaneously, the plus signs can be omitted by setting |chain=. For example, in most Windows systems in North America and Western Europe, Alt codes can be used to insert the plus-minus sign (±) by holding down the Alt key while typing 0177 with the numeric keypad:

Template:TlcTemplate:Tlc produces Alt+0177

An example of a use case where more than five might be used is explaining usage of a macro (keyboard shortcut) created by a third-party application:

Template:Tlc produces Ctrl+Alt+⇧ Shift+⊞ Win+≣ Menu+fn+L

Wiki markup characters

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

Most markup characters also have aliases:

Key symbols

Some key names have a fitting Unicode character. This template automatically adds icons to the following key names among others.

There are no characters for the Windows key and Menu key. So this template shows approximate characters for them, namely the “squared plus” and “strictly equivalent to” signs from the mathematical operators Unicode block:

Directional input

The following should only be used when the input sequence uses something other than the primary input or mixes input between directional devices.

Stick specific diagonals are also supported:

See also

  • Template:Tlx – produces a visual effect for Summertime Saga interface elements.
  • Template:Tlx – indicates user input (of any kind) without making it look like keys or buttons.