How to disable F1-F5 keys

I’m using version 4.12 and I need to disable the F1 keys… I’ve seen a few posts and tried altering the defaultinput.ini - but wanted get a “for sure” answer about what to do to disable the F1-F5 keys from doing different graphics modes.

QUESTION: I don’t have this line in my defaultinput.ini file

[/Script/Engine.PlayerInput]

I have this one…

[/Script/Engine.InputSettings]

do I need to create the engine.playerinput one?

QUESTION: if you change something in defaultinput.ini can I test the change in the editor? or do I have to package up the game before seeing any alteration with the defaultinput.ini file?

It takes me 4 hours to package the game… so its frustrating changing something in the defaultinput.ini and then it still doesn’t disable the F1 keys.

So it would be cool to find out the exact syntax to disable the f1-f5 keys.

Thanks
Bill

I was able to disable the F1-F4 keys but not the F5 key for some reason… Anyone have any ideas.

I am guessing everyone who releases their game has figured this out, right?

or do most ue4 games allow the shader graphics screen when the player presses F5 - that would be weird, huh?

Thanks.

Some keys have bindings and need to be changed in the UE4 editor itself. you can do this by starting the editor, select Edit at the top, select Editor Preferences, select Keyboard shortcuts and painfully go through the list and make changes to all the F1 to F12 keys you can see.

Though, some keys need to be changed manually and cannot be found here.(F5 for example)
This worked for me while using the 4.21 engine to change the keys manually.

  • Locate where uE4 is installed - (“Example:C:\Program Files”)\Epic Games\UE_4.21\Engine\BaseInput.ini
  • Create a backup of the file: BaseInput.ini (Create a copy and rename it to BaseInput.Ini-bkup)
  • Open the file BaseInput.ini using notepad and delete the following lines or modify settings to use different keys.

+DebugExecBindings=(Key=F1,Command=“viewmode wireframe”, bIgnoreShift=True)
+DebugExecBindings=(Key=F2,Command=“viewmode unlit”)
+DebugExecBindings=(Key=F3,Command=“viewmode lit”)
+DebugExecBindings=(Key=F4,Command=“viewmode lit_detaillighting”)
+DebugExecBindings=(Key=F5,Command=“viewmode shadercomplexity”)

  • Save the file once modified.
  • Run UE4 editor and keys from F1 to F5 should be disabled. (Within the UE4 editor.)
3 Likes

It works with F5 also, but it will disable these key mappings in the editor also

DebugExecBinding in BaseInput.ini is eventually being set in PlayerInput. Player Input is accessible from PlayerController, so it is accessible from Controller (in my case, BP_PlayerController) where users inherit and use PlayerController.
It can be accessed through PlayerInput->DebugExecBindings, and values corresponding to f1 to f5 can be disabled according to your style.

still working in ue5.3 :+1: