Template:Key: Difference between revisions
(Created page with "<span style="font-size: small; border: 0.2em solid; border-color: #DDD #BBB #BBB #DDD; padding: 0 0.4em; background: #EEE; white-space: nowrap; border-radius: 2px;"><span style="color:black;">{{ucfirst:{{{1|Key}}}}}</span></span><noinclude> == Description == This template is used to imitate a keyboard button. Category:Formatting templates </noinclude>") |
m (modifying to include key combinations) |
||
Line 1: | Line 1: | ||
< | <includeonly><templatestyles src="Key/styles.css"/>{{ucfirst:{{{1|}}}}}<!-- | ||
-->{{#if:{{{2|}}}|{{{chain first|{{{chain|+}}}}}}{{ucfirst:{{{2}}}}}}}<!-- | |||
-->{{#if:{{{3|}}}|{{{chain second|{{{chain|+}}}}}}{{ucfirst:{{{3}}}}}}}<!-- | |||
-->{{#if:{{{4|}}}|{{{chain third|{{{chain|+}}}}}}{{ucfirst:{{{4}}}}}}}<!-- | |||
-->{{#if:{{{5|}}}|{{{chain fourth|{{{chain|+}}}}}}{{ucfirst:{{{5}}}}}}}<!-- | |||
-->{{#if:{{{6|}}}|{{{chain fifth|{{{chain|+}}}}}}{{ucfirst:{{{6}}}}}}}<!-- | |||
-->{{#if:{{{7|}}}|{{{chain sixth|{{{chain|+}}}}}}{{ucfirst:{{{7}}}}}}}<!-- | |||
-->{{#if:{{{8|}}}|{{{chain seventh|{{{chain|+}}}}}}{{ucfirst:{{{8}}}}}}}<!-- | |||
-->{{#if:{{{9|}}}|{{{chain eighth|{{{chain|+}}}}}}{{ucfirst:{{{9}}}}}}}<!-- | |||
-->{{#if:{{{10|}}}|{{{chain ninth|{{{chain|+}}}}}}{{ucfirst:{{{10}}}}}}}</includeonly><noinclude> | |||
This is the "{{PAGENAME}}" template. This template is used to imitate keyboard buttons. It should be transcluded in the following format: | |||
<pre> | |||
{{key|<first button>|<second>|<third>|<etc.>}} | |||
</pre> | |||
== | === Parameters === | ||
;1 - 10 ''(unnamed parameter)'' | |||
: Keyboard button, separated each entry into its own button (e.g. Ctrl, Alt, I, S, 1, etc.) | |||
== Examples == | |||
* {{key|1}} is produced by <code><nowiki>{{key|1}}</nowiki></code> | |||
* {{key|I}} is produced by <code><nowiki>{{key|I}}</nowiki></code> | |||
* {{key|Alt|1}} is produced by <code><nowiki>{{key|Alt|1}}</nowiki></code> | |||
* {{key|Ctrl|Alt|Del}} is produced by <code><nowiki>{{key|Ctrl|Alt|Del}}</nowiki></code> | |||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
</noinclude> | </noinclude> |
Revision as of 20:19, 18 June 2024
This is the "Key" template. This template is used to imitate keyboard buttons. It should be transcluded in the following format:
{{key|<first button>|<second>|<third>|<etc.>}}
Parameters
- 1 - 10 (unnamed parameter)
- Keyboard button, separated each entry into its own button (e.g. Ctrl, Alt, I, S, 1, etc.)
Examples
- 1 is produced by
{{key|1}}
- I is produced by
{{key|I}}
- Alt+1 is produced by
{{key|Alt|1}}
- Ctrl+Alt+Del is produced by
{{key|Ctrl|Alt|Del}}