How to bind keys

PRZ Gavrila, Sun Jan 28 2024, 11:00AM

In some of the scripts I'll show you, you'll bind a particular action to a key. To do this, you insert a line in your config file that looks like this:

bind

For example, bind "K" "kill". This line in your config file will make it so you can press "K" to commit suicide.

Here is a list of things you can put for

Alphabet: A-Z
Numbers: 0-9
Function keys: F1-F12
Punctuation: -[]/'.,;~=
SPACE, TAB, SHIFT, CTRL, ALT, ENTER, BACKSPACE
PAUSE
Arrow keys: UPARROW, DOWNARROW, LEFTARROW, RIGHTARROW
INS, HOME, PGUP, DEL, END, PGDN
Numeric keypad: KP_HOME, KP_SLASH, *, KP_MINUS, KP_UPARROW,
                KP_DOWNARROW, KP_LEFTARROW, KP_RIGHTARROW,
                KP_PGUP, KP_5, KP_PLUS, KP_ENTER, KP_END,
                KP_PGDN, KP_INS, KP_DEL
Left mouse button: MOUSE1
Right mouse button: MOUSE2
Middle mouse button: MOUSE3
More mouse buttons: MOUSE4/MOUSE5 (some mice have extra buttons)
Mousewheel scroll up: MWHEELUP
Mousewheel scroll down: MWHEELDOWN
As for