Difference between revisions of "Template:Key press"

From LFS Manual
Jump to navigationJump to search
m
m
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{key press/core|{{{1|}}}}}<!--
 
{{key press/core|{{{1|}}}}}<!--
-->{{#if:{{{2|}}}|{{{chain first|{{{chain|+}}}}}}{{key press/core|{{{2}}}}}}}<!--
+
-->{{#if:{{{2|}}}|{{{chain first|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{2}}}}}}}<!--
-->{{#if:{{{3|}}}|{{{chain second|{{{chain|+}}}}}}{{key press/core|{{{3}}}}}}}<!--
+
-->{{#if:{{{3|}}}|{{{chain second|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{3}}}}}}}<!--
-->{{#if:{{{4|}}}|{{{chain third|{{{chain|+}}}}}}{{key press/core|{{{4}}}}}}}<!--
+
-->{{#if:{{{4|}}}|{{{chain third|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{4}}}}}}}<!--
-->{{#if:{{{5|}}}|{{{chain fourth|{{{chain|+}}}}}}{{key press/core|{{{5}}}}}}}<!--
+
-->{{#if:{{{5|}}}|{{{chain fourth|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{5}}}}}}}<!--
-->{{#if:{{{6|}}}|{{{chain fifth|{{{chain|+}}}}}}{{key press/core|{{{6}}}}}}}<!--
+
-->{{#if:{{{6|}}}|{{{chain fifth|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{6}}}}}}}<!--
-->{{#if:{{{7|}}}|{{{chain sixth|{{{chain|+}}}}}}{{key press/core|{{{7}}}}}}}<!--
+
-->{{#if:{{{7|}}}|{{{chain sixth|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{7}}}}}}}<!--
-->{{#if:{{{8|}}}|{{{chain seventh|{{{chain|+}}}}}}{{key press/core|{{{8}}}}}}}<!--
+
-->{{#if:{{{8|}}}|{{{chain seventh|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{8}}}}}}}<!--
-->{{#if:{{{9|}}}|{{{chain eighth|{{{chain|+}}}}}}{{key press/core|{{{9}}}}}}}<!--
+
-->{{#if:{{{9|}}}|{{{chain eighth|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{9}}}}}}}<!--
-->{{#if:{{{10|}}}|{{{chain ninth|{{{chain|+}}}}}}{{key press/core|{{{10}}}}}}}<!--
+
-->{{#if:{{{10|}}}|{{{chain ninth|{{{chain|&nbsp;+ }}}}}}{{key press/core|{{{10}}}}}}}<!--
 
-->{{#if:{{{11|}}}|[[Category:Wikipedia keypress template parameter needs fixing]]}}<noinclude>
 
-->{{#if:{{{11|}}}|[[Category:Wikipedia keypress template parameter needs fixing]]}}<noinclude>
<!-- add category and language links to the /doc sub-page, not here -->
+
<!-- add category and language links to the /doc sub-page (we don't currently have /doc subpages on lfsmanual), not here -->
 +
== Template documentation ==
 +
This template allows you to illustrate keyboard keystrokes or a combination of multiple simultaneous keystrokes.
 +
=== Examples ===
 +
For keystroke combinations, just use extra parameters:
 +
<pre>{{key press|Ctrl|Shift|F}}</pre>
 +
Renders as: {{key press|Ctrl|Shift|F}}
 +
 
 +
To illustrate keystrokes where all keys do not need to be pressed simultaneously, set "chain=" to omit multiple plus signs.
 +
<pre>{{key press|Alt|0}}{{key press|1|7|7|chain=}}</pre>
 +
Renders as: {{key press|Alt|0}}{{key press|1|7|7|chain=}}
 +
 
 +
Special characters need to be entered as HTML entities:
 +
<pre>
 +
{{key press|&amp;#124;}}
 +
{{key press|&amp;#59;}}
 +
{{key press|&amp;#61;}}
 +
</pre>
 +
Renders as:
 +
{{key press|&#124;}}
 +
{{key press|&#59;}}
 +
{{key press|&#61;}}
 +
 
 +
or with aliases:
 +
<pre>
 +
{{key press|pipe}}
 +
{{key press|semicolon}}
 +
{{key press|equals}}
 +
{{key press|colon}}
 +
{{key press|asterisk}}
 +
{{key press|hash}}
 +
</pre>
 +
Renders as:
 +
{{key press|pipe}}
 +
{{key press|semicolon}}
 +
{{key press|equals}}
 +
{{key press|colon}}
 +
{{key press|asterisk}}
 +
{{key press|hash}}
 +
 
 +
Key symbols:
 +
<pre>
 +
{{key press|Ctrl}}
 +
{{key press|Shift}}
 +
{{key press|Tab}}
 +
{{key press|Enter}}
 +
{{key press|Option}}
 +
{{key press|Opt}}
 +
{{key press|Command}}
 +
{{key press|Cmd}}
 +
{{key press|Caps Lock}}
 +
{{key press|Up}}
 +
{{key press|Down}}
 +
{{key press|Left}}
 +
{{key press|Right}}
 +
{{key press|Win}}
 +
{{key press|Menu}}
 +
</pre>
 +
Renders as:
 +
{{key press|Ctrl}}
 +
{{key press|Shift}}
 +
{{key press|Tab}}
 +
{{key press|Enter}}
 +
{{key press|Option}}
 +
{{key press|Opt}}
 +
{{key press|Command}}
 +
{{key press|Cmd}}
 +
{{key press|Caps Lock}}
 +
{{key press|Up}}
 +
{{key press|Down}}
 +
{{key press|Left}}
 +
{{key press|Right}}
 +
{{key press|Win}}
 +
{{key press|Menu}}
 +
 
 +
 
 +
Mouse buttons:
 +
<pre>
 +
{{key press|LMB}}
 +
{{key press|RMB}}
 +
{{key press|MMB}}
 +
 
 +
{{key press|left mouse button}}
 +
{{key press|right mouse button}}
 +
{{key press|scroll wheel}}
 +
</pre>
 +
Renders as:
 +
 
 +
{{key press|LMB}}
 +
{{key press|RMB}}
 +
{{key press|MMB}}
 +
 
 +
{{key press|left mouse button}}
 +
{{key press|right mouse button}}
 +
{{key press|scroll wheel}}
 
</noinclude>
 
</noinclude>

Revision as of 13:59, 7 January 2022

Template documentation

This template allows you to illustrate keyboard keystrokes or a combination of multiple simultaneous keystrokes.

Examples

For keystroke combinations, just use extra parameters:

{{key press|Ctrl|Shift|F}}

Renders as: Ctrl + ⇧ Shift + F

To illustrate keystrokes where all keys do not need to be pressed simultaneously, set "chain=" to omit multiple plus signs.

{{key press|Alt|0}}{{key press|1|7|7|chain=}}

Renders as: Alt + 0177

Special characters need to be entered as HTML entities:

{{key press|&#124;}}
{{key press|&#59;}}
{{key press|&#61;}}

Renders as: | ; =

or with aliases:

{{key press|pipe}}
{{key press|semicolon}}
{{key press|equals}}
{{key press|colon}}
{{key press|asterisk}}
{{key press|hash}}

Renders as: | ; = : * #

Key symbols:

{{key press|Ctrl}}
{{key press|Shift}}
{{key press|Tab}}
{{key press|Enter}}
{{key press|Option}}
{{key press|Opt}}
{{key press|Command}}
{{key press|Cmd}}
{{key press|Caps Lock}}
{{key press|Up}} 
{{key press|Down}}
{{key press|Left}}
{{key press|Right}}
{{key press|Win}}
{{key press|Menu}}

Renders as: Ctrl ⇧ Shift Tab ↹ ↵ Enter ⌥ Option ⌥ Opt ⌘ Command ⌘ Cmd ⇪ Caps Lock ⊞ Win ≣ Menu


Mouse buttons:

{{key press|LMB}}
{{key press|RMB}}
{{key press|MMB}}

{{key press|left mouse button}}
{{key press|right mouse button}}
{{key press|scroll wheel}}

Renders as:

LMB RMB MMB

LMB RMB MMB