This page describes how to add key icons to documentation text.
Keypresses can be added by enclosing the keys within a span element that is
marked with the class keypress
. For example the key @
is encoded with this text:
<span class="keypress">@</span>
Key combinations
Keypress combinations are enclosed in a single span element, with a dash separating the separate keystrokes that are supposed to be pressed at the same time. For example the key combination alt-s is created with the text:
<span class="keypress">alt-s</span>
Key sequences
A sequence of keys to press in succession is encoded by placing a plus sign between each key. For example 3+s is created with the text:
<span class="keypress">3+s</span>
Key sequences and combinations mixtures
Key sequences and combinations can be mixed in the same span content. For example the keys 3+alt-s, which means press the 3 key followed by alt-s, is created by the text:
<span class="keypress">3+alt-s</span>
Special key names
Here is a list of keys that have special names: