Template:Key press/doc: Difference between revisions
m 1 revision imported |
Started correcting documentation |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| Line 8: | Line 4: | ||
Example | Example | ||
: {{ | : <nowiki>{{key press|A}}</nowiki> → {{key press|A}} | ||
===Keystroke combinations=== | ===Keystroke combinations=== | ||
To illustrate keystroke combinations, just use extra parameters: | To illustrate keystroke combinations, just use extra parameters: | ||
: {{ | : <nowiki>{{key press|Alt|P}}</nowiki> → {{key press|Alt|P}} | ||
: {{ | : <nowiki>{{key press|Ctrl|Alt|Del}}</nowiki> → {{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 then that might cause too wide items. Then instead manually build the key combination with spaces around the "+" so it can line wrap: | 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 then that might cause too wide items. Then instead manually build the key combination with spaces around the "+" so it can line wrap: | ||
: {{ | : <nowiki>{{key press|Ctrl}}</nowiki> + <nowiki>{{key press|Alt}}</nowiki> + <nowiki>{{key press|Del}}</nowiki> → {{key press|Ctrl}} + {{key press|Alt}} + {{key press|Del}} | ||
: {{ | : <nowiki>{{key press|Ctrl|Alt|Del|5=chain=&#32;+&#32;}}</nowiki> → {{key press|Ctrl|Alt|Del|chain= + }} | ||
On the other hand, to illustrate Windows [[Alt code]]s you might want to use separate templates with no intervening punctuation or space. In most Windows systems in North America and Western Europe, for example, the [[plus-minus sign]] (±) can be entered by holding down the Alt key while typing <code>0177</code> (with the [[numeric keypad]]): | On the other hand, to illustrate Windows [[Alt code]]s you might want to use separate templates with no intervening punctuation or space. In most Windows systems in North America and Western Europe, for example, the [[plus-minus sign]] (±) can be entered by holding down the Alt key while typing <code>0177</code> (with the [[numeric keypad]]): | ||