Killing Floor 2

Killing Floor 2

123 ratings
How to set Sprint to toggle
By {ST}Immortal Nub
setbind leftshift "toggle bRun"
This is also a guide for keybinds.
   
Award
Favorite
Favorited
Unfavorite
Toggle sprint
Press tilde (~), input the following, and press enter:

setbind leftshift "toggle bRun"

If you only came for toggle sprint, then consider this the end of the guide.















How to undo this keybind
Documents > My Games > KillingFloor2 > KFGame > Config > KFInput

Scroll all the way to the bottom, then scroll up until you find
Bindings=(Name="LeftShift",Command="toggle bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

Replace it with
Bindings=(Name="LeftShift",Command=,Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

*Notice how the only difference is that you remove "toggle bRun"
These should all be one line btw.

If you find [Configuration], then you have gone too far (or just ctrl+F it).
Keybinds with tilde and F3
Let us take a closer look at the binding we just did, shall we?

setbind leftshift "toggle bRun"

setbind is the command that allows you to rebind a key.
As you are typing in the command prompt, you should notice the game giving you hints as to what command you want to use.

If you type setbind, you should notice underneath it saying:
SetBind BindName[FName] Command[FString]

The [FName] requires the name of the keystroke, while [FString] requires a command.
In the case of the BindName[FName], we did leftshift.
For Command[FString], we did toggle bRun.

Now you could theoretically put anything you want.
For example, you can do
setbind ROFLCOPTER "Hi, hoe"
and you will create a line in KFInput that is
Bindings=(Name="ROFLCOPTER",Command="Hi, hoe",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

Problem is that there is no such key on your keyboard called ROFLCOPTER, and no such command called Hi, hoe.
That is to give you an idea with what is happening under the hood.

Try experimenting with commands. Don't start with setbind. Type s, and notice all the possible commands that you can do. Do it with another letter, and another. There are a lot of commands to choose from, all of which can be used in Command[FString] for setbind. If you want to cycle through these commands, open the command prompt with F3, then use the arrow keys to cycle through the commands.

The downside to using the command prompt is that you are limited in what you can do. You cannot use commands in conjunction to shift, ctrl, or alt; and it is more of a hassle to modify your existing commands.

This is the devs' sprint command
Bindings=(Name="GBA_Sprint",Command="Button bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

Button bRun... Toggle bRun... I am sure you can figure out what Button and Toggle do ;)
Useful bindings using tilde or F3 command prompt
setbind numpadzero "say Scrake!"
setbind add "say @$$pounder!"
add is from the number pad.
setbind numpadsix "say A HEALING CLOUD is present."
setbind numpadfour "say Cheese it!"
setbind k "say Anyone need dosh? If so, how much?"
setbind l "say Here is 300 dosh; buy some armor. | tossmoney | tossmoney | tossmoney | tossmoney | tossmoney | tossmoney"

That vertical slash is the drop weapon keybind from KF1, that is if you are holding shift while doing it. It allows you to chain multiple commands into one keybind. Make sure you include quotes if you chain commands, or it will not work.
Documents > My Games > KillingFloor2 > KFGame > Config > KFInput
I just gave you the path to the file where all of your setbinds and other commands get stored. You might want to create a shortcut somewhere... and a backup so the next update can reset your file without pi$$ing you off..

Between [Configuration] and [Iniversion] is where you will be messing with your commands: at the bottom of the file.

Remember this?
setbind leftshift "toggle bRun"
The game looked through KFInput when you did that to see if there was a binding for leftshift, and there was. So instead of creating a new line for leftshift, it was remapped.
Bindings=(Name="LeftShift",Command="toggle bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

Now the reason for the italics and underlining in the code snippets is to show you what changes if you use something other than leftshift or a command other than toggle bRun from using the command prompt ingame.

Now for the Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False (D@mn, that is a mouthful...). If you set Control, Shift, or Alt to true, then you have to hold down that key in conjunction to your keybind. If you set bIgnoreCtrl, bIgnoreShift, or bIgnoreAlt to true, then the command will not happen when you hold any of the those keys in conjuction to the keybind.

Here is an example:
Bindings=(Name="B",Command="TossMoney",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=True)
Bindings=(Name="B",Command="TossMoney | TossMoney | TossMoney | TossMoney | TossMoney | TossMoney | TossMoney | TossMoney | TossMoney | TossMoney",Control=False,Shift=False,Alt=True,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
I know it looks messy, but notice how the first command has bIgnoreAlt set to true, and the second has Alt set to true. The first command will toss 50 dosh when you press B. The second one will toss 500 dosh when you hold alt and press B. If bIgnoreAlt on the first command was set to false, then you would have executed both commands by holding alt.
Creating your own commands (KFInput)
Now instead of using keys from your keyboard for BindName[FName], we can do ROFLCOPTER. No I am not kidding.

Bindings=(Name="ROFLCOPTER",Command="say Hi, hoe",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
*I added the say so the command will work.
Now that you have created the command ROFLCOPTER, you can use it for Command[FString].
Bindings=(Name="J",Command="ROFLCOPTER",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
Press J, and you will say "Hi, hoe."

How about a more familiar example from the devs?
Bindings=(Name="GBA_Sprint",Command="Button bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
Bindings=(Name="LeftShift",Command="GBA_Sprint",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

I would recommend having all of your custom commands to start with the same name.
Example: Custom_Poof, Custom_MegaMan, Custom_Sprint
Don't know the name of a certain keystroke?
No problem! Just go to the ingame keybinds menu, and map the desired key to some random command that you don't give a $hit about. Then you go to KFInput and search through your keybinds until you find the the command you set the key to. If the key was never previously mapped before, you should find it just above [Iniversion].

I once tried to figure out what (-) was called. It wasn't minus, and subtract was already reserved for the number pad. I went to the ingame keybinds and mapped it to Last Used Weapon. I went to KFInput and found this just above [Iniversion]:
Bindings=(Name="Underscore",Command="GBA_LastWeapon",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)
Now I know it is called underscore. Never would have guessed. If you try this with a different key, and it is not on the very bottom of the keybinds, then it was previously mapped to something else. Just look for Command="GBA_LastWeapon", and you will find it (assuming you had it bound to Last Used Weapon).
12 Comments
Shopix 2 Oct, 2021 @ 12:21pm 
Einfach nur traurig, dass die das nicht so direkt ins Spiel implementiert haben.
Hypnotic 13 Sep, 2021 @ 6:33am 
I have question can i make let's say pressing H+W buttons to move or run without holding my W button ? this is the most perfect feature i think :steamhappy: ...
FAB 11 Dec, 2019 @ 10:18pm 
What does the add command do? Also do you know how to have a team chat command? say is general chat command.
St. Haborym 17 May, 2018 @ 9:58pm 
Hey, this is pretty useful.
Ned_Flanders 22 Dec, 2016 @ 11:32am 
But I understand that I cant actually change the text from 'NEGATIVE' to, for example 'No, sir!'?
{ST}Immortal Nub  [author] 7 Nov, 2016 @ 7:33pm 
@Korgrath You can see this with just about any ranged weapon. If you fire your weapon while you are sprinting, your character will shoot their gun as usual, but he will also lower his weapon. When you do this with a caulk n burn or a flamethrower, your weapon will continue firing because it is spray-based, even after lowering your weapon. You basically do the same thing as swiping the mouse as you suggest, only the game does it for you and you don't have to reposition your aim all the time. Not only that, but you won't run the risk of wasting ground fire by attempting to place it where it is already there; ground fires won't stack if you just shoot the same place for the duration of the post fire. It is especially noticable when you run clockwise around a medium zed while doing this since you swipe your weapon to the left during post fire. Besides, toggle sprint kicks ass and I wanted an excuse to bump it ;)
Chanrevo 7 Nov, 2016 @ 1:06pm 
I read this in your fire bug guide, and you didn't really get too far into it. Could you explain the reason for the sprint tap fire? It creates a wall of fire? Can't I just do that by waving my mouse in an arch??
{ST}Immortal Nub  [author] 18 Sep, 2016 @ 5:17pm 
It's by no means perfect, but it is better than having an aching pinky.
Sir Duckyweather 18 Sep, 2016 @ 4:49pm 
One thing I noticed is that you can't crouch while sprint is toggled on, but it's not a big deal. Just press the sprint key again and you can crouch once more.
{ST}Immortal Nub  [author] 4 Sep, 2016 @ 4:19pm 
@Sir Duckyweather, Rat with Eyepatch
You can actually change the ingame sprint keybind to toggle.

Dev Keybind:
Bindings=(Name="GBA_Sprint",Command="Button bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

Chnage "Button" to "Toggle"

Now when you go to the menu to change keybinds, you don't have to bother with the console command window.