How to keybind functions in Rust
Press F1 to open game console
Ensure console tab is selected at the upper-left hand corner.
Use the following structure and change accordingly to your needs:
bind <key> <function> <value>
bind k chat.say test
Do note that not all binds require values unless the function requires it:
bind c duck
How to bind multiple functions to a single key
Using the method above, simply add a semi-colon at the end of each string:
bind z attack;duck
The above bind will execute both attack and duck at the same time when the key is pressed. This bind, in particular, is used to auto harvest nodes.
How to bind multiple binds at once
It's a good practice to always save your binds in the event they're reset by an update. This method allows you to bind all of your commands at once without having to do them one-by-one.
Using the same method as above, simply add a semi-colon after every string:
bind c duck;bind z attack;bind r reload;bind p run;bind z attack;duck
There is no limit to how many binds you can execute at once just be sure to be careful with binds that require multiple values.
Useful Binds
bind q forward;sprint
bind z attack;duck
bind z +attack;+duck
bind c duck
Default Binds
bind f1 consoletoggle
bind w +forward
bind s +backward
bind a +left
bind d +right
bind mouse0 +attack
bind mouse1 +attack2
bind mouse2 +attack3
bind 1 +slot1
bind 2 +slot2
bind 3 +slot3
bind 4 +slot4
bind 5 +slot5
bind 6 +slot6
bind 7 +slot7
bind 8 +slot8
bind leftshift +sprint
bind rightshift +sprint
bind leftalt +altlook
bind r +reload
bind space +jump
bind leftcontrol +duck
bind e +use
bind v +voice
bind g +map
bind t chat.open
bind return chat.open
bind mousewheeldown +invnext
bind mousewheelup +invprev
bind tab inventory.toggle
bind q inventory.togglecrafting
bind f lighttoggle
bind n inventory.examineheld
bind x swapseats
bind c +compass