Input mapping in game

I want to allow the player to change the default input mapping in the game menu, like every game ever :).
I have all the bindings set up in the Engine → Input and on this page it says

It also makes remapping which keys are mapped to the behavior easy, both at a project level if you change your mind about default settings, and for a user in a key binding UI.

But I can’t figure out how to do it! Any ideas?

I’m also interested in this. I have found snippets on how to to it but they are not complete enough to put it all together.

This doesn’t seem to work at the moment.

I solved it myself with:

  • an enumerator for all the “bindable actions”
  • an enumerator for all the “bindable hokeys”
  • a struct, “hotKey” that takes a “bindable action” and a “bindable hotkey”
  • an array of "hotKey"s that I set up manually for all the default bindings
  • and then, in the player controller, add all the events for the “bindable hotkeys” that checks if it is referenced in the “hotKey” array, and if it is, execute the action

Now, I was able to create a GUI that could add, change and remove items in the “hotKey” array. :smiley: