Template:InlineKey: Difference between revisions
From Step Mods | Change The Game
No edit summary |
|||
Line 1: | Line 1: | ||
<includeonly><span style="background-color:#999; background:linear-gradient(#999, #444); cursor:default; border:1px solid #111; border-radius:3px; color:#DDD;"> | <includeonly><span style="background-color:#999; background:linear-gradient(#999, #444); cursor:default; border:1px solid #111; border-radius:3px; color:#DDD;"> | ||
{{#switch: {{{1}}} | {{#switch: {{{1}}} | ||
| arrowLeft = <span style="padding: | | arrowLeft = <span style="padding:0 .05em .1em .25em;">'''←'''</span> | ||
| arrowRight = <span style="padding: | | arrowRight = <span style="padding:0 .05em .1em .25em;">'''→'''</span> | ||
| arrowUp = <span style="padding: | | arrowUp = <span style="padding:0 .2em .1em .4em;">'''↑'''</span> | ||
| arrowDown = <span style="padding: | | arrowDown = <span style="padding:0 .2em .1em .4em;">'''↓'''</span> | ||
| enter = <span style="padding: .1em .2em .2em .2em;">'''Enter ↲'''</span> | | enter = <span style="padding:.1em .2em .2em .2em;">'''Enter ↲'''</span> | ||
| backspace = <span style="padding: | | backspace = <span style="padding:0 1.2em .1em .4em;">'''←─'''</span> | ||
| shift = <span style="padding: | | shift = <span style="padding:0 1.2em .1em .4em;">⇧</span> | ||
| capsLock = <span style="padding: | | capsLock = <span style="padding:0 1.2em .1em .4em; color:#000;">🔒</span> | ||
| tab = <span style="padding: | | tab = <span style="padding:0 1.2em .1em .5em;">↹</span> | ||
| #default = <span style="padding: | | #default = <span style="padding:0 {{{paddingRight|.1em}}} .1em {{{paddingLeft|.4em}}};">'''{{{1}}}'''</span> | ||
}} | }} | ||
</span></includeonly><noinclude>__NOTOC__ | </span></includeonly><noinclude>__NOTOC__ |
Revision as of 21:09, June 23, 2015
Purpose & Usage
- parameter 1 is the content of the key. It works with characters / strings / html code and a set of predefined buttons.
Available predefined keys :
- Left arrow : arrowLeft
- Right arrow : arrowRight
- Up arrow : arrowUp
- Down arrow : arrowDown
- Enter : enter
- Backspace : backspace
- Shift : shift
- Caps Lock : capsLock
- Tabulation : tab
- (optional) paddingRight parameter define the space between the content of the key and the end of the visual. (don't work for pre-defined keys)
- (optional) paddingLeft parameter define the space between the content of the key and the beginning of the visual. (don't work for pre-defined keys)
This template is used to create an inline keyboard button, for coolness, swagginess, and awesomeness of "press this key to do this" instructions.
Examples
Code:
People with {{InlineKey|A}} {{InlineKey|Z}} {{InlineKey|E}} {{InlineKey|R}} {{InlineKey|T}} {{InlineKey|Y}} keyboards are nice.
Result: People with A Z E R T Y keyboards are nice.
Code:
List of all available predefined key : {{InlineKey|arrowLeft}} ; {{InlineKey|arrowRight}} ; {{InlineKey|arrowUp}} ; {{InlineKey|arrowDown}} ; {{InlineKey|enter}} ; {{InlineKey|backspace}} ; {{InlineKey|shift}} ; {{InlineKey|capsLock}} ; {{InlineKey|tab}}
Result: List of all available predefined key : ← ; → ; ↑ ; ↓ ; Enter ↲ ; ←─ ; ⇧ ; 🔒 ; ↹
Code:
Pressing {{InlineKey|Alt|paddingRight=1.2em}}+ {{InlineKey|F4}} will close your browser, don't do it if you still need to read this ;)
Result: Pressing Alt + F4 will close your browser, don't do it if you still need to read this ;)