|
|
Line 1: |
Line 1: |
| {{Documentation|fromWikipedia=true}}
| |
|
| |
|
| This is the {{tl|key press}} 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
| |
| : {{tc|key press|A}} → {{key press|A}}
| |
| 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:
| |
| : {{tc|key press|Alt|P}} → {{key press|Alt|P}}
| |
| : {{tc|key press|Ctrl|Alt|Del}} → {{key press|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:
| |
| : {{tc|key press|Ctrl}} + {{tlc|key press|Alt}} + {{tlc|key press|Del}} → {{key press|Ctrl}} + {{key press|Alt}} + {{key press|Del}}
| |
| : {{tc|key press|Ctrl|Alt|Del|5=chain= + }} → {{key press|Ctrl|Alt|Del|chain= + }}
| |
|
| |
| 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 {{key press|Alt}} key while typing <code>0177</code> with the numeric keypad:
| |
| : {{tc|key press|Alt|0}}{{tlc|key press|1|7|7|chain{{=}}}} → {{key press|Alt|0}}{{key press|1|7|7|chain=}}
| |