Controls/Control – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Add joysticks)
(Add Caps Lock formatting)
 
(4 intermediate revisions by the same user not shown)
Line 11: Line 11:
| rmb
| rmb
| mouser= {{Icon|mouseR}}
| mouser= {{Icon|mouseR}}
| msw
| mousesw= {{Icon|mouseSW}}
| mswu
| mouseswu= {{Icon|mouseSWU}}
| mswd
| mouseswd= {{Icon|mouseSWD}}


| xbox= {{#switch:{{lc:{{{2}}}}}
| xbox= {{#switch:{{lc:{{{2}}}}}
Line 214: Line 220:
}}</span>
}}</span>


| #default= <span class="control-keyboard-key">{{#switch:{{lc:{{{1}}}}}
| #default= <kbd>{{#switch:{{lc:{{{1}}}}}
|escape= Esc
|escape= Esc
|enter= Enter &crarr;
|enter= Enter &crarr;
Line 225: Line 231:
|pageup= &#8607; PgUp
|pageup= &#8607; PgUp
|pagedown= &#8609; PgDown
|pagedown= &#8609; PgDown
|control= Ctrl
|ctrl
|control
|lctrl= Ctrl
|lctrl= Ctrl
|rctrl
|rctrl
|rcontrol= RCtrl
|rcontrol= RCtrl
|ralt= AltGr
|ralt= AltGr
|shift= &#8679; Shift
|shift
|lshift= &#8679; Shift
|rshift= RShift &#8679;
|rshift= RShift &#8679;
|caps
|capslock
|caps lock= &#128274;CapsLock <!-- ideally use caps lock -->
|tab
|tabulation= &#8633; Tab
|tabulation= &#8633; Tab
|win
|win
Line 255: Line 267:
|numenter= NUM Enter &crarr;
|numenter= NUM Enter &crarr;
|#default= {{ucFirst:{{{1}}}}}
|#default= {{ucFirst:{{{1}}}}}
}}</span>
}}</kbd>
}}
}}
|-no key defined-{{TemplateCase||[[Category:Controls template usage error]]}}
|-no key defined-{{TemplateCase||[[Category:Controls template usage error]]}}
Line 273: Line 285:
*** mouseR or RMB
*** mouseR or RMB
*** mouseM or MMB
*** mouseM or MMB
*** mouseSW or MSW
*** mouseSWU or MSWU
*** mouseSWD or MSWD
** generic pad buttons:
** generic pad buttons:
*** padUp / padDown / padLeft / padRight
*** padUp / padDown / padLeft / padRight
Line 301: Line 316:
*** up / down / left / right
*** up / down / left / right
*** pageUp / pageDown
*** pageUp / pageDown
*** control / LCtrl
*** ctrl / control / LCtrl
*** RCtrl / RControl
*** RCtrl / RControl
*** RAlt
*** RAlt
*** shift
*** shift / LShift
*** RShift
*** RShift
*** tabulation
*** caps lock / capslock / caps
*** tab / tabulation
*** LWin / Windows
*** LWin / Windows
*** RWin / RWindows
*** RWin / RWindows
Line 324: Line 340:
|result4= {{Controls/Control|a}}
|result4= {{Controls/Control|a}}


|example5= <nowiki>{{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|RMB}}</nowiki>
|example5= <nowiki>{{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|MSW}}{{Controls/Control|MSWU}}{{Controls/Control|MSWD}}{{Controls/Control|RMB}}</nowiki>
|result5= {{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|RMB}}
|result5= {{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|MSW}}{{Controls/Control|MSWU}}{{Controls/Control|MSWD}}{{Controls/Control|RMB}}


|example6= <nowiki>{{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}}</nowiki>
|example6= <nowiki>{{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}}</nowiki>
|result6= {{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}}
|result6= {{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}}


|example7= <nowiki>{{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}}</nowiki>
|example7= <nowiki>{{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|caps lock}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}}</nowiki>
|result7= {{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}}
|result7= {{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|caps lock}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}}


|example8= <nowiki/>
|example8= <nowiki/>

Latest revision as of 19:29, 29 March 2024

Displays a keyboard key or a mouse icon — used by {{Controls}}. It also adds the page to the Controls template usage error category on usage error.

Gamepad icons use PromptFont, a very nice font made under the SIL Open Font Licence.
Find it at https://shinmera.github.io/promptfont/.

This template is used on these pages.

Usage

{{Controls/Control|control}}

  • control: can be one of:
    • mouse icon (case-insensitive):
      • mouse
      • mouseL or LMB
      • mouseL2 or LMB2
      • mouseR or RMB
      • mouseM or MMB
      • mouseSW or MSW
      • mouseSWU or MSWU
      • mouseSWD or MSWD
    • generic pad buttons:
      • padUp / padDown / padLeft / padRight
      • padJoyUp / padJoyUpRight / padJoyRight / padJoyDownRight / padJoyDown / padJoyDownLeft / padJoyLeft / padJoyUpLeft
      • padLjoyUp / padLjoyUpRight / padLjoyRight / padLjoyDownRight / padLjoyDown / padLjoyDownLeft / padLjoyLeft / padLjoyUpLeft
      • padRjoyUp / padRjoyUpRight / padRjoyRight / padRjoyDownRight / padRjoyDown / padRjoyDownLeft / padRjoyLeft / padRjoyUpLeft
      • padA / padB / padX / padY
      • padLB / padLT / padLSB
      • padRB / padRT / padRSB
      • padBack / padStart
    • Xbox- && PlayStation-specific:
      • joyUp / joyUpRight / joyRight / joyDownRight / joyDown / joyDownLeft / joyLeft / joyUpLeft
      • LjoyUp / LjoyUpRight / LjoyRight / LjoyDownRight / LjoyDown / LjoyDownLeft / LjoyLeft / LjoyUpLeft
      • RjoyUp / RjoyUpRight / RjoyRight / RjoyDownRight / RjoyDown / RjoyDownLeft / RjoyLeft / RjoyUpLeft
    • Xbox-specific with Xbox as first parameter:
      • A / B / X / Y
      • LB / LT / LSB
      • RB / RT / RSB
      • Back / Start
    • PlayStation-specific with PlayStation as first parameter:
      • Cross / Circle / Square / Triangle (also supports A / B / X / Y)
      • L1 / L2 / L3 (also supports LB / LT / LSB)
      • R1 / R2 / R3 (also supports RB / RT / RSB)
      • Select / Start (also supports Back)
      • Options / Touchpad / Share
    • pre-formatted key:
      • escape / enter / delete / backspace
      • up / down / left / right
      • pageUp / pageDown
      • ctrl / control / LCtrl
      • RCtrl / RControl
      • RAlt
      • shift / LShift
      • RShift
      • caps lock / capslock / caps
      • tab / tabulation
      • LWin / Windows
      • RWin / RWindows
      • num0..9 / num/ / num* / num- / num+ / num. / numEnter
    • anything else for a keyboard key - the first letter will be capitalised (e.g abcdEf will become AbcdEf)
Examples
Code Result
{{Controls/Control}} -no key defined-
{{Controls/Control|ctrl}} Ctrl
{{Controls/Control|Ctrl}} Ctrl
{{Controls/Control|a}} A
{{Controls/Control|mouse}}{{Controls/Control|LMB}}{{Controls/Control|LMB2}}{{Controls/Control|MMB}}{{Controls/Control|MSW}}{{Controls/Control|MSWU}}{{Controls/Control|MSWD}}{{Controls/Control|RMB}} MouseLeft Mouse ButtonDouble Left Mouse ButtonMiddle Mouse ButtonMouse ScrollwheelMouse Scrollwheel UpMouse Scrollwheel DownRight Mouse Button
{{Controls/Control|escape}}{{Controls/Control|enter}}{{Controls/Control|delete}}{{Controls/Control|backspace}}{{Controls/Control|up}}{{Controls/Control|down}}{{Controls/Control|left}}{{Controls/Control|right}}{{Controls/Control|pageup}}{{Controls/Control|pagedown}} EscEnter ↵Del↟ PgUp↡ PgDown
{{Controls/Control|control}}{{Controls/Control|lctrl}}{{Controls/Control|rctrl}}{{Controls/Control|rcontrol}}{{Controls/Control|ralt}}{{Controls/Control|shift}}{{Controls/Control|rshift}}{{Controls/Control|caps lock}}{{Controls/Control|tabulation}}{{Controls/Control|lwin}}{{Controls/Control|windows}}{{Controls/Control|rwin}}{{Controls/Control|rwindows}} CtrlCtrlRCtrlRCtrlAltGr⇧ ShiftRShift ⇧🔒CapsLock↹ Tab⊞ Win⊞ WinRWin ⊞RWin ⊞

{{Controls/Control|num/}}{{Controls/Control|num*}}{{Controls/Control|num-}}{{Controls/Control|num+}}
{{Controls/Control|num7}}{{Controls/Control|num8}}{{Controls/Control|num9}}
{{Controls/Control|num4}}{{Controls/Control|num5}}{{Controls/Control|num6}}
{{Controls/Control|num1}}{{Controls/Control|num2}}{{Controls/Control|num3}}
{{Controls/Control|num0}}{{Controls/Control|num.}}{{Controls/Control|numenter}}

NUM /NUM *NUM -NUM +
NUM 7NUM 8NUM 9
NUM 4NUM 5NUM 6
NUM 1NUM 2NUM 3
NUM 0NUM .NUM Enter ↵

{{Controls/Control|padUp}}{{Controls/Control|padDown}}{{Controls/Control|padLeft}}{{Controls/Control|padRight}} {{Controls/Control|padA}}{{Controls/Control|padB}}{{Controls/Control|padX}}{{Controls/Control|padY}} {{Controls/Control|padLB}}{{Controls/Control|padLT}}{{Controls/Control|padLSB}}{{Controls/Control|padRB}}{{Controls/Control|padRT}}{{Controls/Control|padRSB}} {{Controls/Control|padBack}}{{Controls/Control|padStart}}

{{Controls/Control|padjoymove}}{{Controls/Control|padjoyupdown}}{{Controls/Control|padjoyleftright}} {{Controls/Control|padjoyup}}{{Controls/Control|padjoyupright}}{{Controls/Control|padjoyright}}{{Controls/Control|padjoydownright}}{{Controls/Control|padjoydown}} {{Controls/Control|padjoydownleft}}{{Controls/Control|padjoyleft}}{{Controls/Control|padjoyupleft}} {{Controls/Control|padljoymove}}{{Controls/Control|padljoyupdown}}{{Controls/Control|padljoyleftright}} {{Controls/Control|padljoyup}}{{Controls/Control|padljoyright}}{{Controls/Control|padljoydown}}{{Controls/Control|padljoyleft}} {{Controls/Control|padrjoymove}}{{Controls/Control|padrjoyupdown}}{{Controls/Control|padrjoyleftright}} {{Controls/Control|padrjoyup}}{{Controls/Control|padrjoyright}}{{Controls/Control|padrjoydown}}{{Controls/Control|padrjoyleft}}


{{Controls/Control|xbox|up}}{{Controls/Control|xbox|down}}{{Controls/Control|xbox|left}}{{Controls/Control|xbox|right}} {{Controls/Control|xbox|A}}{{Controls/Control|xbox|B}}{{Controls/Control|xbox|X}}{{Controls/Control|xbox|Y}} {{Controls/Control|xbox|LB}}{{Controls/Control|xbox|LT}}{{Controls/Control|xbox|LSB}}{{Controls/Control|xbox|RB}}{{Controls/Control|xbox|RT}}{{Controls/Control|xbox|RSB}} {{Controls/Control|xbox|Back}}{{Controls/Control|xbox|Start}}


{{Controls/Control|playstation|up}}{{Controls/Control|playstation|down}}{{Controls/Control|playstation|left}}{{Controls/Control|playstation|right}} {{Controls/Control|playstation|A}}{{Controls/Control|playstation|B}}{{Controls/Control|playstation|X}}{{Controls/Control|playstation|Y}} {{Controls/Control|playstation|LB}}{{Controls/Control|playstation|LT}}{{Controls/Control|playstation|LSB}}{{Controls/Control|playstation|RB}}{{Controls/Control|playstation|RT}}{{Controls/Control|playstation|RSB}} {{Controls/Control|playstation|Back}}{{Controls/Control|playstation|Start}}
{{Controls/Control|playstation|Options}}{{Controls/Control|playstation|Touchpad}}{{Controls/Control|playstation|Share}}