Difference between revisions of "Template:Key"
Line 19: | Line 19: | ||
</table>}}<noinclude> | </table>}}<noinclude> | ||
== Usage == | == Usage == | ||
− | Handles up to 5 keys and their descriptions. | + | Based on the HUD display from HL2. Handles up to 5 keys and their descriptions. |
* <code><nowiki>{{key|CTRL}}</nowiki></code> generates inline: | * <code><nowiki>{{key|CTRL}}</nowiki></code> generates inline: | ||
− | + | ::Crouching is easy to do. Simply press the {{key|CTRL}} key to crouch. | |
− | |||
* <code><nowiki>{{key|MOUSE2|airblast}}</nowiki></code> generates inline also: | * <code><nowiki>{{key|MOUSE2|airblast}}</nowiki></code> generates inline also: | ||
− | + | ::Lorem ipsum dolor sit amet, {{key|MOUSE2|airblast}}, dolor sit amet lorem. | |
− | {{key|MOUSE2|airblast}} | ||
{{key | align = right | {{key | align = right | ||
Line 38: | Line 36: | ||
| key4 = D | | key4 = D | ||
| desc4 = backward | | desc4 = backward | ||
+ | | key5 = MOUSE1 | ||
+ | | desc5 = attack | ||
}} | }} | ||
+ | * The following code produces a right-aligned table, handy for multiple keys and their descriptions: | ||
<pre style="width: 50%;"><nowiki> | <pre style="width: 50%;"><nowiki> | ||
{{key | align = right | {{key | align = right | ||
Line 49: | Line 50: | ||
| key4 = D | | key4 = D | ||
| desc4 = backward | | desc4 = backward | ||
+ | | key5 = MOUSE1 | ||
+ | | desc5 = attack | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> |
Revision as of 07:21, 5 August 2010
Usage
Based on the HUD display from HL2. Handles up to 5 keys and their descriptions.
{{key|CTRL}}
generates inline:
- Crouching is easy to do. Simply press the CTRL key to crouch.
{{key|MOUSE2|airblast}}
generates inline also:
- Lorem ipsum dolor sit amet, MOUSE2+airblast, dolor sit amet lorem.
{{{1}}}
- The following code produces a right-aligned table, handy for multiple keys and their descriptions:
{{key | align = right | key1 = W | desc1 = forward | key2 = A | desc2 = left | key3 = S | desc3 = right | key4 = D | desc4 = backward | key5 = MOUSE1 | desc5 = attack }}