How to change Input Manager settings in-game?

I want to make a simple window in my game where players will be able to change key bindings, every game has this in settings. I already have everything set up in the Input Manager and I want to have in-game buttons which after being pressed wait for input, find which button has just been pressed an assign it to a certain axis in the Input Manager. Just like in input settings in launcher. Any way of doing that?

If you want to change input at runtime in-game then you need to use your own input manager, you cannot change the default InputManager at runtime.