Binds & Console

KF2: Bind to Hide the HUD While Aiming Down Sights

This guide shows how to make the HUD (team health bars and other clutter) vanish whenever you aim down sights. The original method edits KFInput.ini by hand: you add two new keywords and then point your ironsights key at them. Take it slowly, since the file is long. Make a backup copy first.

Part 1: add the new definitions

  1. Open C:\Users\(YourUsername)\Documents\My Games\KillingFloor2\KFGame\Config\ and open KFInput.ini in Notepad.
  2. Press CTRL+F and search for GBA_IronsightsHold, the default keyword for held ironsights.
  3. Click Find Next once. Select the whole line you found and the line above it. These are the default definitions for toggling and holding ironsights.
  4. Replace those two lines with these four:
Bindings=(Name="GBA_IronsightsToggle",Command="Ironsights | OnRelease IronsightsRelease")
Bindings=(Name="GBA_IronsightsToggleHideHud",Command="Ironsights | ToggleHUD | OnRelease IronsightsRelease")
Bindings=(Name="GBA_IronsightsHold",Command="Ironsights 1 | OnRelease IronsightsRelease 1")
Bindings=(Name="GBA_IronsightsHoldHideHud",Command="Ironsights 1 | ToggleHUD | OnRelease IronsightsRelease 1 | OnRelease ToggleHUD")

The defaults stay in, in case the game needs them. The two new keywords tell the game to enter ironsights and toggle the HUD. With the toggle variant the HUD will not return until you press the aim button again.

Part 2: the second definition area

The file has a second area of definitions further down. Go back to the top, search GBA_IronsightsHold again and use Find Next four times. The author was unsure this part is needed but advised doing it anyway. Select that line and the one above it, and replace them with the same four definitions, now with the extra fields on each line:

Bindings=(Name="GBA_IronsightsToggle",Command="Ironsights | OnRelease IronsightsRelease",Control=False,Shift=False,Alt=False,bIgnoreCtrl=False,bIgnoreShift=False,bIgnoreAlt=False)

and so on for the other three, each ending with those same Control=False,...,bIgnoreAlt=False fields. Make sure each Bindings entry starts on its own line (pasting may merge lines).

Several commenters complained that counting Find Next presses is error-prone and that the guide should name the section instead. After editing, check that all four names are present.

Ironsights (hold)

Use this if you hold the button to aim. Search GBA_IronsightsHold, press Find Next seven times until you see your hold-aim key on the left, click between the "d" and the closing quote and type HideHud. The entry now reads GBA_IronsightsHoldHideHud. Save the file.

Ironsights (toggle)

Use this if you press once to aim and again to leave. Search GBA_IronsightsToggle, press Find Next seven times until you see your toggle key, add HideHud after "Toggle" to get GBA_IronsightsToggleHideHud, and save. If you use both on different keys, do both.

Console alternative

A commenter suggests a shorter method for hold-to-aim: enter the console command

SetBind RightMouseButton "ShowHUD False | OnRelease ShowHUD True"

and then rebind your aim button elsewhere. It also works well with melee weapons. The author noted that tying a command to ZED time is probably impossible without a mutator.

See also: auto-sprint, ironsights and crouch bind setup and advanced keybinds with SetBind.

FAQ

Which file do I edit to hide the HUD while aiming?
KFInput.ini in Documents\My Games\KillingFloor2\KFGame\Config.
Is there a faster way than editing the file?
A commenter suggests the console command SetBind RightMouseButton "ShowHUD False | OnRelease ShowHUD True" for hold-to-aim, then rebinding your aim button.