Reseting Keybinds

I’m trying to make a way for me to reset my keybinds in godot by storing them in an array and loading them when I want to reset. I’m thinking I might as well hardcode them since the binds won’t change (and if they do I can always change it). I’m just struggling getting the key in the array so when I load an entry, it’s a bind Godot recognizes.

If it helps for what I’m asking for, I’m basically just wanting to know how can I store InputEventKeys in an array and specific keys

If I am understanding correctly, you can change your key binds and be able to reset them to default. You might want to look at the InputMap class and its load_from_project_settings() method. You can set the default in project settings, then reset the inputs to what they are in project settings.

1 Like