Binds & Console

KF2 Toggle Sprint Bind and How KFInput.ini Bindings Work

This community guide starts with a one-line answer to a common request, toggle sprint in Killing Floor 2, and then explains how bindings work in KFInput.ini so you can build your own. For a broader reference of key names and commands see the SetBind guide.

Toggle sprint

Open the console with the tilde key, type the following and press Enter:

setbind leftshift "toggle bRun"

That is all you need if you only wanted toggle sprint.

How to undo it

Open Documents\My Games\KillingFloor2\KFGame\Config\KFInput.ini, scroll to the bottom and find the line with Name="LeftShift",Command="toggle bRun". Replace the command with nothing (delete just toggle bRun, keep Command=). Each binding must stay on one line. If you reach [Configuration] you have gone too far.

What setbind does

The syntax is SetBind BindName[FName] Command[FString]: the key name first, then the command. The console shows hints while you type, so try typing a single letter to browse available commands. The F3 quick console lets you cycle through commands with the arrow keys. The in-game console cannot combine commands with Shift, Ctrl or Alt, which is why editing the file is more powerful.

The developers' own sprint binding is GBA_Sprint with Button bRun (hold). Toggle bRun makes it a toggle instead.

Handy chat and dosh binds

  • setbind numpadzero "say Scrake!" and similar warnings for other ZEDs or a healing cloud.
  • setbind k "say Anyone need dosh? If so, how much?"
  • A chained bind that says a message and calls tossmoney several times, separated by |. Keep the quotation marks.

Editing KFInput.ini directly

All binds are stored between [Configuration] and [Iniversion] at the bottom of the file. A line looks like Bindings=(Name="LeftShift",Command="toggle bRun",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False). When you use setbind on a key that already has a line, the game rewrites that line instead of adding a new one. Back the file up, because an update can reset it.

  • Setting Control, Shift or Alt to True means that modifier must be held.
  • Setting bIgnoreCtrl, bIgnoreShift or bIgnoreAlt to True means the binding does not fire while that modifier is held.
  • Example: key B with bIgnoreAlt=True tosses 50 dosh; a second line for B with Alt=True and ten TossMoney commands tosses 500 dosh while Alt is held.

Custom command names

A name in Name= does not have to be a real key. You can define Bindings=(Name="Custom_Hello",Command="say Hi, hoe",...) and then point a real key at it with Command="Custom_Hello". This is how the developers chain GBA_Sprint to LeftShift. The author recommends giving all your custom commands the same prefix, for example Custom_Sprint.

Finding a key's name

Bind the key to a throwaway action in the in-game controls menu, then look in KFInput.ini for that action. A key that was never bound before appears just above [Iniversion]. For example, the minus key turned out to be called Underscore.

FAQ

What is the toggle sprint command?
Open the console and enter: setbind leftshift "toggle bRun".
Where are keybinds stored?
In KFInput.ini under Documents/My Games/KillingFloor2/KFGame/Config, between [Configuration] and [Iniversion].