Resetting input mappings to defaults

Hello, I have moved a codebase from using the Rama input binding system to one that just uses UE4 native functions. I am trying to implement a “Reset to Defaults” button, but I cannot figure out how to make the input system load just the DefaultInput.ini that we ship with the game.

Because the game previously used the Rama blueprint library for key remapping, customized user bindings are saved to the user’s Saved folder as Input.ini.

I find that if I call ReloadConfig or LoadConfig on the InputSettings default object specifying the shipped DefaultInput.ini, it loads both the original one we shipped with the game and the user’s custom one.

Is there a way to have the input system load only the shipped DefaultInput.ini, ignoring any user overrides? Or, failing that, to specify a custom “DefaultDefaultInput.ini” that has the default mapping?

Good news/ bad news, I have a unconfirmed solution that will work on my experience but badly its blueprints. I read a lot about this on how to reset input bindings which they all can confirm on saving it on a savegame slot which makes struct variables. Sadly what i did is that it will never save the user custom inputs but will reset to default when called. I made individual widget child that can be put into the settings panel. and made some “key type variables” then expose it to spawn.


then it will look like this:

select a your own default key that matches the Project Input settings, it may take to long to do but i find this way more easy than the others.
This will set on event construct and call when reset.

Then this will take care of resetting the inputs, first it will remove Action/axis mappings customized by the user and then will add my selected default keys to specific mapping. (Sorry for the messy blueprint)

1 Like