API:RestoreDefaultBindings
From RoR Wiki
UI Lua API · Bindings functions
Version: WAR 1.4.8
Replaces all key bindings with the game's default bindings.
RestoreDefaultBindings()
Arguments
None.
Returns
Nothing.
Details
- All current bindings are removed and the built-in defaults are installed in their place. Custom bindings made with AddBinding are lost.
SystemData.Events.KEYBINDINGS_UPDATEDis raised afterwards.- Arguments are not checked; anything passed is ignored.
Errors
None.
Example
From default/ea_keymappingwindow/source/keymappingwindow.lua:
function KeyMappingWindow.RestoreDefaults()
RestoreDefaultBindings()
CreateActionsDataTable()
UpdateActionList()
KeyMappingWindow.hasChanged = true
end
