Input Mapping

Methods

void load_config ( bool enable_next=true )
int save_to_config ( )
void save_all ( )

Constants

Default value = “user://inputmap.cfg”

Members

Description

This is a singleton that helps a set of keys to be saved as an input map for later use. This input map will be persistent as it is loaded each time the game is started.

You can access this singleton via the name Input_Map followed by one of the methods of the class.

Method Descriptions

  • void load_config ( )

Loads the file specified in CONFIG_FILE, if it can not find it, this function will create it.

This is a generic function to save specific information to a ConfigFile. Can be used for saving any value, related to any key, under any section. For input information, the section is “input”, the key is the action name and the value is the scancode of the action.

  • void save_all ( )

Saves the current Input Map into a ConfigFile saved in CONFIG_FILE that can be later accessed using load_config.