Change keybindings in C++?


I basically have no idea how to rebind keys in game. I have heard of Rama’s Plugin, and want something like that, but I don’t really want a whole plugin with tons of stuff, just one function, so I’d like to write one in my code. Te part I don’t understand is how to overwrite the currently assigned keybinding. I am making a C++ function library, and most of my stuff (Including the controller) is in blueprints. Not sure if this matters or not, since all I need to do is change the values that were set in the editor options/config section.

Basically I just need the code snippet that will let me get the current keybinding and replace it with the new keybinding. I also saw BindKey but this doesn’t seem useful to me because it binds a key to an event, but the event is already bound in the blueprint, so I just need to change what key is associated with the name.

Thanks for any help.