Quick answer: Godot 4 InputMap defaults reset after player remaps keys? InputMap modifications are session-only - save to user:// config and load on startup.
Player rebinds Jump to F. Restart the game. Jump is back to Space.
Save bindings
for action in InputMap.get_actions():
config.set_value("input", action,
InputMap.action_get_events(action))
config.save("user://input.cfg")Iterate actions; serialize events; save.
Restore on startup
Mirror the save: iterate; clear default events; add saved events. Runs in _ready of autoload.
Or use the Settings autoload
Centralize settings persistence in an autoload. InputMap is one of many settings; the pattern reuses.
“InputMap is runtime state. Persisting it is your responsibility.”
Build a 'reset to defaults' option in the bindings UI. Players who break their bindings can recover without uninstalling.