Rust Wiki

Revision Difference


<cat>Play.General</cat> <title>Keybinds</title> <warning>This page is not complete and is still a work-in-progress!<br/> Feel free to contribute but I must ask that you follow the styling format that has already been used :)</warning> # What are keybinds all about? Keybinds allow you to add extra customisability to your controls whilst playing the game and allow you to: - Change aspects of your gameplay on the fly at the press of a button - Combine different actions into 1 or multiple buttons - Access different controls you usually are not able to unless you use the F1 console - Put your keyboard to full use and enhance your Rust experience #Creating your first keybind So you've come to the conclusion that you hate having to kill your character to respawn by pressing F1 each time and typing 'kill' as you learnt on the [commands page]( Let's make that more convenient for you! Now hit F1 whilst in-game (You don't even have to be in a server!) and type out: ```markdown bind k kill ``` Now anytime that you want to find yourself back on the respawn menu you can hit <key>k</key> and your character will drop dead like a minnow out of a survival fishing trap! (Permitted that you haven't been trying to kill yourself too quickly and are on cooldown) #Keybind general formula The general formula to create a keybind is as follows: ```markdown bind key action ``` #The multi-key keybind So you've realised after a while of having your basic "tap k to kill yourself" keybind that you've off'ed yourself a good few times without even meaning to resulting in gamer-rage beyond belief. Luckily you can set keybinds so multiple keys are required to perform the action, here's how we can improve the previous kill keybind: ```markdown bind [leftshift+k] kill ``` Now you'll have to hold <key>leftshift</key> (the shift key but the left one under <key>capslock</key> ) and then tap <key>k</key> to kill your character which will result in a much safer hazard-free method which you won't fat-finger by accident #Keybind special symbols ##The semicolon ; Putting a semicolon between actions in your keybind declarations will allow you to perform multiple actions using 1 keybind setup. For example, you can have it so every time you press <key>x</key> you go forward but also sprint: (auto-run!) ```markdown bind x forward;sprint ``` or every time you open the F1 console you also open the combatlog: ```markdown bind f1 consoletoggle;combatlog ``` or every time you press j you sprint forward and jump: ```markdown bind j +forward;+sprint;+jump ``` ##The plus + When you add a plus symbol preceding the action in your keybind it will mean that the keybind will perform this action only whilst the buttons you've assigned are being pressed. Try the difference yourself with the two auto-run keybinds below: ```markdown bind x +forward;+sprint ``` and then: ```markdown bind x forward;sprint ``` The first keybind will only make you sprint forward whilst you are holding <key>x</key> however the second keybind will make you continuously sprint forward until it is overridden with your regular walk forward bind (Most likely set to <key>w</key> ) ##The tilde ~ When you add a tilde symbol before an action and then include another action afterwards using the previously discussed semicolon the keybind will cycle through the actions given allowing you to have a keybind that can toggle between different actions.<br/> This keybind will flip the view model of the item you're holding in your hand every time you hit it ```markdown bind rightarrow ~graphics.vm_horizontal_flip 0;graphics.vm_horizontal_flip 1 ``` You could also use this to cycle through different FOVs for example: ```markdown bind [rightshift+rightcontrol] ~graphics.fov 70;graphics.fov 80;graphics.fov 90 ``` ### Reseting the cycle state You can reset what state you are on the bind's cycle by binding `meta.reset_cycle` to another key. This can be done as follows: ```markdown bind x meta.reset_cycle y ``` with <key>x</key> being the key you want to reset the cycle and <key>y</key> being the key that the cycle (~) bind is set to ##+meta.if_true & +meta.if_false Creating a bind combining these commands will allow you to have an action only active whilst the keybind is being pressed and have another action in place when the keybind is not being pressed. For example, you could have a side button on your mouse that when pressed will decrease your FOV to 'zoom in' but when it is not being pressed will keep your FOV at your normal level ```markdown bind mouse4 +meta.if_true "fov 70";+meta.if_false "fov 80" ``` The action following `+meta.if_true` will be what happens when the key is being pressed and the action following `+meta.if_false` will be what happens when the key is not being pressed #Unassigning keys If you've made a mistake with a keybind or simply don't want it anymore you can easily get rid of it by typing out the bind once again but instead of including an action do an empty set of quote marks as shown: ```markdown bind x "" ``` or you can use the `clear` action ```markdown bind x clear ``` #Chat feedback with keybinds You can add the `chat.add` action in your keybind to get feedback in chat when you use them.<br/> An example of doing this would be: ```markdown bind h craft.add -2072273936 1;chat.add 0 0 "You just crafted a bandage!" ``` This keybind crafts a bandage and displays a message to chat that only you will be able to see <upload src="2b7da/8d8c49e0e1df4f5.png" size="60531" name="image.png" /> The first 0 in the chat.add command can be changed to a 1 so "[team]" is displayed in the message and the second 0 can be changed to a Steam64ID to change the image sent next to your message - putting this to 0 just displays the Rust logo #Making sure your keybinds are saved After setting up any keybinds in the F1 console that you are wanting to keep you should run the `writecfg` command to make sure your changes have been written to the config files. Your keybinds will be saved to the `keys.cfg` file inside your Rust directory at \Steam\steamapps\common\Rust<br/> If you're still unsure on where this folder is you can go to your Steam library >> Right-click Rust >> Manage >> Browse local files <upload src="2b7da/8d8bc03f0be89f3.png" size="105309" name="image.png" /> #Some useful keybinds Here are some common useful keybinds alongside a description of what they do; the keys are given as examples, change to your preference. ##Player binds: | Keybind |Description | | :------------------------------------------------:|:----------------------------------| | `bind [leftshift+k] kill` | Commit suicide to respawn | | `bind f1 consoletoggle;combatlog` | Run combatlog on opening console | | `bind x forward;sprint` | Auto-run until you manually press forward again| | `bind z duck` | Toggle crouch until you manually press crouch again| | `bind [leftshift+f11] attack` | Auto-attack - constantly attack until you manually attack again (LMB)| | `bind [rightshift+f11] attack;duck` | Auto-attack and toggle crouch | | `bind mouse1 +lighttoggle;+attack2` | Turn on flashlight/laser when ADS | | `bind f10 client.disconnect` | Disconnects you from the server you're on| | `bind 7 chat.say "Hello everyone!"` | Sends a message to global chat | | `bind 8 chat.teamsay "Hey Team!!"` | Sends a message to team chat | | `bind h "craft.add -2072273936 1"` | Auto-crafts 1 bandage | ##Admin binds: | Keybind |Description | | :------------------------------------------------:|:----------------------------------| | `bind [leftshift+h] debugcamera` | Enables debugcamera | | `bind [leftshift+t] teleport2marker` | Teleports you to your map marker | | `bind p "ent kill"` | Kills the entity you're looking at| | `bind u "ent unlock"` | Unocks the entity you're looking at| | `bind l "ent lock"` | Locks the entity you're looking at| | `bind j noclip` | Toggles flight | | `bind delete "layer.toggle Construction" ` | Hides all player buildings for a better view| | `bind [leftshift+rightcontrol] "weather.load clear"`| Makes the server's weather sunny and clear| #Key dictionary Here is a list of what each key is called when using Rust keyboard keybinds for a regular **UK** QWERTY keyboard: | key |Also known as | | :------------------------------------------------:|:----------------------------------| |mouse0|Left mouse button| |mouse1|Right mouse button| |mouse2|Scroll wheel click| |mouse3|Side button (if applicable)| |mouse4|Side button (if applicable)| |mousewheeldown|Scrolling the mouse wheel downwards| |mousewheelup|Scrolling the mouse wheel upwards| |a|| |b|| |c|| |d|| |e|| |f|| |g|| |h|| |i|| |j|| |k|| |l|| |m|| |n|| |o|| |p|| |q|| |r|| |s|| |t|| |u|| |v|| |w|| |x|| |y|| |z|| |1|| |2|| |3|| |4|| |5|| |6|| |7|| |8|| |9|| |0|| |backquote|back tick, tilde, open quote, left quote, key above tab| |minus|Subtract, dash, hyphen| |plus|Add, cross| |insert|| |home|| |pageup|| |pagedown|| |delete|| |end|| |f1|| |f2|| |f3|| |f4|| |f5|| |f6|| |f7|| |f8|| |f9|| |f10|| |f11|| |f12|| |sysreq|Print Screen, PrtSc| |scrolllock|Scroll lock| |numlock|Top left key on the numpad| |keypaddivide|The " / " on the numpad| |keypadmultiply|The " * " on the numpad| |keypadminus|The " - " on the numpad| |keypadplus|The " + " on the numpad| |keypadenter|The " enter " on the numpad| |keypadperiod|The " . " on the numpad (when numlock is toggled)| |keypad1|| |keypad2|| |keypad3|| |keypad4|| |keypad5|| |keypad6|| |keypad7|| |keypad8|| |keypad9|| |keypad0|| |uparrow|The up arrow left of the numpad| |downarrow|The down arrow left of the numpad| |leftarrow|The left arrow left of the numpad| |rightarrow|The right arrow left of the numpad| |rightcontrol|"ctrl" on the right side of the keyboard| |leftcontrol|"ctrl" on the left side of the keyboard| |rightshift|"shift" on the right side of the keyboard| |leftshift|"shift" on the left side of the keyboard| |slash|" / "| |period|" ." fullstop| |comma|" , "| |quote|" # "| |backquote|" ' "| |semicolon|" ; "| |leftbracket|" [ "| |rightbracket|" ] "| |return|Enter| |backslash|" \\ "| |capslock|| |leftcommand|Windows key (binding this will be problematic anyway)| #Action dictionary Here is a list of various actions you can assign to a keybind alongside a description: | Action |Description | | :------------------------------------------------:|:----------------------------------| |forward|Move forwards relating to the direction your player is facing| |backward|Move backwards relating to the direction your player is facing| |left|Move left relating to the direction your player is facing| |right|Move right relating to the direction your player is facing| |jump|Jump / stay afloat in water| |duck|Crouch| |sprint|When combined with moving forward will make the player run| |use|Interacting with objects in the world: doors, boxes, locks| |attack|Primary attack: shooting, hitting| |attack2|Secondary attack: throwing item, aiming down sights | |attack3|Take half a stack of items| |consoletoggle|Brings up the in-game console| |hoverloot|Loot from an inventory by holding the assigned button and hovering over each slot (should be used with + preceding)| |voice|Proximity voice chat| |craft.add|Allows you to add items to your crafting queue with a bind. Use item ID afterwards followed by quantity. Find Item IDs [here](| |combatlog|Calls the most recent display of the combatlog showing what your player has damaged and been damaged by - does not open console| |kill|Kills your player taking you back to the respawn menu| |disconnect|Disconnects you from the server| |quit|Closes your game to desktop| |layer.toggle|Toggles different layers in the "tools" menu in F1 for admins to be able to see through different layers. AI/Construction/Transparent/Debris/Default/Deployed/Ragdoll/Terrain/Tree/World/Water/Clutter| |lighttoggle|Toggles weapon flashlights/lasers/candle hats/miners helmets||lighttoggle|Toggles weapon flashlights/lasers/candle hats/miners helmets| You can find a list of useful commands that you can also assign to keys by checking out the [commands wiki page](