Bind: Difference between revisions
m (→BindToggle: removed a space that should not have been there) |
(→Special Keys: reformatted the entire list) |
||
| Line 11: | Line 11: | ||
{{note|Quotation marks around strings are not always required, but should be used to ensure that special characters, such as spaces and semicolons, are not misinterpreted.}} | {{note|Quotation marks around strings are not always required, but should be used to ensure that special characters, such as spaces and semicolons, are not misinterpreted.}} | ||
== | {| class="standard-table" | ||
! width="80px" | Bind name | |||
! width="200px" | Key | |||
|- id="tab" | |||
| tab | |||
| Tabulator (Above Capslock) | |||
|- id="capslock" | |||
| capslock | |||
| Capslock | |||
|- id="shift" | |||
| shift | |||
| Shift (Below Capslock) | |||
|- id="backspace" | |||
| backspace | |||
| Backspace (Above Enter) | |||
|- id="enter" | |||
| enter | |||
| Enter | |||
|- id="escape" | |||
| escape | |||
| "ESC" (Top Left of keyboard) | |||
|- id="space" | |||
| space | |||
| Spacebar | |||
|- id="alt" | |||
| alt | |||
| Alt (Left of Spacebar) | |||
|- id="uparrow" | |||
| uparrow | |||
| Up Arrow | |||
|- id="downarrow" | |||
| downarrow | |||
| Down Arrow | |||
|- id="leftarrow" | |||
| leftarrow | |||
*kp_minus | | Left Arrow | ||
|- id="rightarrow" | |||
| rightarrow | |||
| Right Arrow | |||
|- id="ins" | |||
| ins | |||
| Insert (Above arrows) | |||
|- id="del" | |||
| del | |||
| Delete (Above arrows) | |||
|- id="pgdn" | |||
| pgdn | |||
| Page Down (Above arrows) | |||
|- id="pgup" | |||
| pgup | |||
| Page Up (Above arrows) | |||
|- id="home" | |||
| home | |||
| Home (Above arrows) | |||
|- id="end" | |||
| end | |||
| End (Above arrows) | |||
|- id="pause" | |||
| pause | |||
| Pause / Break (Above arrows) | |||
|- id="1" | |||
| kp_end | |||
| Keypad 1 | |||
|- id="2" | |||
| kp_downarrow | |||
| Keypad 2 | |||
|- id="3" | |||
| kp_pgdn | |||
| Keypad 3 | |||
|- id="4" | |||
| kp_leftarrow | |||
| Keypad 4 | |||
|- id="5" | |||
| kp_5 | |||
| Keypad 5 | |||
|- id="6" | |||
| kp_rightarrow | |||
| Keypad 6 | |||
|- id="7" | |||
| kp_home | |||
| Keypad 7 | |||
|- id="8" | |||
| kp_uparrow | |||
| Keypad 8 | |||
|- id="9" | |||
| kp_pgup | |||
| Keypad 9 | |||
|- id="enter" | |||
| kp_enter | |||
| Keypad Enter | |||
|- id="0" | |||
| kp_ins | |||
| Keypad 0 | |||
|- id="delete" | |||
| kp_del | |||
| Keypad . | |||
|- id="slash" | |||
| kp_slash | |||
| Keypad / | |||
|- id="multiply" | |||
| kp_multiply | |||
| Keypad * | |||
|- id="minus" | |||
| kp_minus | |||
| Keypad - | |||
|- id="plus" | |||
| kp_plus | |||
| Keypad + | |||
|- id="mwheeldown" | |||
| mwheeldown | |||
| Mouse - Scroll Down | |||
|- id="mwheelup" | |||
| mwheelup | |||
| Mouse - Scroll Up | |||
|- id="mouse1" | |||
| mouse1 | |||
| Mouse - Left click | |||
|- id="mouse2" | |||
| mouse2 | |||
| Mouse - Right click | |||
|- id="mouse3" | |||
| mouse3 | |||
| Mouse - Wheel click | |||
|- id="mouse4" | |||
| mouse4 | |||
| Mouse - Page Back | |||
|- id="mouse5" | |||
| mouse5 | |||
| Mouse - Page Forward | |||
|- id="joy1-4 | |||
| joy'''''1-4''''' | |||
| {{todo|Explain}} | |||
|- id="aux1-31" | |||
| aux'''''1-31''''' | |||
| {{todo|Explain}} | |||
|} | |||
==Related console commands== | ==Related console commands== | ||
Revision as of 14:32, 10 December 2019
bind is a console command that lets you bind other console commands to a key.
Syntax
bind KEY COMMANDS
If you wanted to make your v key toggle noclip, you would type bind "v" "noclip" in the console.
| Bind name | Key |
|---|---|
| tab | Tabulator (Above Capslock) |
| capslock | Capslock |
| shift | Shift (Below Capslock) |
| backspace | Backspace (Above Enter) |
| enter | Enter |
| escape | "ESC" (Top Left of keyboard) |
| space | Spacebar |
| alt | Alt (Left of Spacebar) |
| uparrow | Up Arrow |
| downarrow | Down Arrow |
| leftarrow | Left Arrow |
| rightarrow | Right Arrow |
| ins | Insert (Above arrows) |
| del | Delete (Above arrows) |
| pgdn | Page Down (Above arrows) |
| pgup | Page Up (Above arrows) |
| home | Home (Above arrows) |
| end | End (Above arrows) |
| pause | Pause / Break (Above arrows) |
| kp_end | Keypad 1 |
| kp_downarrow | Keypad 2 |
| kp_pgdn | Keypad 3 |
| kp_leftarrow | Keypad 4 |
| kp_5 | Keypad 5 |
| kp_rightarrow | Keypad 6 |
| kp_home | Keypad 7 |
| kp_uparrow | Keypad 8 |
| kp_pgup | Keypad 9 |
| kp_enter | Keypad Enter |
| kp_ins | Keypad 0 |
| kp_del | Keypad . |
| kp_slash | Keypad / |
| kp_multiply | Keypad * |
| kp_minus | Keypad - |
| kp_plus | Keypad + |
| mwheeldown | Mouse - Scroll Down |
| mwheelup | Mouse - Scroll Up |
| mouse1 | Mouse - Left click |
| mouse2 | Mouse - Right click |
| mouse3 | Mouse - Wheel click |
| mouse4 | Mouse - Page Back |
| mouse5 | Mouse - Page Forward |
| joy1-4 | Todo: Explain
|
| aux1-31 | Todo: Explain
|
Related console commands
Todo: binds_per_command
BindToggle
A convenient command for toggling a Cvar on or off by pressing a key. Functionally identical to bind KEY "incrementvar CVAR 0 1 1".
Syntax:
BindToggle KEY CVAR
If you wanted your p key to turn sv_cheats on or off, you would type BindToggle p sv_cheats.
bind_mac
Functions identically to bind except it only affects Mac OS users, not Windows.
unbind
The opposite of bind. Sets a key to do nothing.
Syntax:
unbind KEY
To make your left click do nothing, you would type unbind MOUSE1.
unbind_mac
Functions identically to unbind except it only affects Mac OS users, not Windows.
unbindall
The infamous command that unbinds all the keys.
key_listboundkeys
Lists all keys that are bound to something, and what they are bound to.
Example input and output from Half-Life 2:
] key_listboundkeys "6" = "slot6" "1" = "slot1" "a" = "+moveleft" "2" = "slot2" "c" = "impulse 50" "3" = "slot3" "d" = "+moveright" "4" = "slot4" "e" = "+use" "5" = "slot5" "f" = "impulse 100" "g" = "phys_swap" "q" = "lastinv" "w" = "+forward" "r" = "+reload" "z" = "+zoom" "s" = "+back" "`" = "toggleconsole" "SPACE" = "+jump" "NUMLOCK" = "pause" "ESCAPE" = "cancelselect" "SHIFT" = "+speed" "CTRL" = "+duck" "ALT" = "+walk" "F5" = "jpeg" "F6" = "save quick" "F9" = "load quick" "MOUSE1" = "+attack" "MWHEELDOWN" = "invnext" "MOUSE2" = "+attack2" "MWHEELUP" = "invprev"
key_findbinding
Searches through the list of bound keys and returns the ones that have a given substring in the command field.
Syntax:
key_findbinding STRING
Example input and output from Half-Life 2:
] key_findbinding slot "1" = "slot1" "2" = "slot2" "3" = "slot3" "4" = "slot4" "5" = "slot5" "6" = "slot6"