InputMap
Runtime map of named actions and input bindings.
Create an action with AddAction, bind an InputEvent with ActionAddEvent, then query an event or Input state. Registration, binding, event matching and held state are separate operations. Editing the map does not persist user settings by itself.
ActionGetEvents copies the list, not event resources. EventIsAction can match release and is not a pressed check. In 1.0.0, GetActionDescription lists key bindings only. A complete rebinding UI needs event enumeration and separate persistence.
LoadFromProjectSettings replaces the runtime map from current ProjectSettings, discarding temporary edits. Singleton is borrowed; do not dispose it. GUID-owned actions and reload were tested in an isolated Windows headless project. Physical input, GUI dispatch, disk persistence and other platforms were not accepted.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
SingletonProperty
public static InputMapInstance Singleton { get; }Borrowed cached InputMapInstance for the same runtime singleton used by static methods. Do not create a second InputMap or dispose this wrapper. Static InputMap APIs suffice for ordinary action configuration.
Methods14
ActionAddEventvoid
public static void ActionAddEvent(StringName action, InputEvent @event);Adds an InputEvent reference to an existing action. Uses exact binding/device matching rather than wrapper identity; ordinary duplicates are skipped. Device=0 on key/mouse events is normalized to the device category AFTER that check, mutating the supplied resource and potentially adding equivalent duplicates. Set the correct category before calling. Later resource edits change the binding; this injects no OS event and persists no configuration.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
event | InputEvent | — |
actionExisting action name; only AddAction accepts a new unique name.
eventNon-null InputEvent to match/bind; wrapper identity is generally not the matching criterion.
ActionEraseEventvoid
public static void ActionEraseEvent(StringName action, InputEvent @event);Removes the first exact binding match, including device. Another wrapper with the same binding can match; no match removes nothing. Removing a matching event also releases a held action. Use ActionEraseEvents to remove every binding.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
event | InputEvent | — |
actionExisting action name; only AddAction accepts a new unique name.
eventNon-null InputEvent to match/bind; wrapper identity is generally not the matching criterion.
ActionEraseEventsvoid
public static void ActionEraseEvents(StringName action);Removes all bindings from an existing action and releases its held state. The action name and deadzone remain; changes are not written to disk.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting action name; only AddAction accepts a new unique name.
ActionGetDeadzonefloat
public static float ActionGetDeadzone(StringName action);Reads an existing action's stored deadzone. GetVector averages four such values when its deadzone argument is negative.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting Input Map action name.
floatStored number. For a missing action, reports an error and returns 0; that does not establish a valid zero setting.
ActionGetEventsReckfell.Collections.Array<InputEvent>
public static Reckfell.Collections.Array<InputEvent> ActionGetEvents(StringName action);Returns a new typed Array<InputEvent>: editing the list does not edit InputMap. Its InputEvent resources are shared and can be the same C# wrappers, so event edits change active bindings. Do not dispose a borrowed element to clear the list; use InputMap removal methods. Typed Array has no Dispose method.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting action name; only AddAction accepts a new unique name.
Reckfell.Collections.Array<InputEvent>New typed Array<InputEvent> with shared resources; its container has no Dispose method.
ActionHasEventbool
public static bool ActionHasEvent(StringName action, InputEvent @event);Tests exact binding matching for an existing action, including device, not wrapper identity. A match does not mean the action is currently held.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
event | InputEvent | — |
actionExisting action name; only AddAction accepts a new unique name.
eventNon-null InputEvent to match/bind; wrapper identity is generally not the matching criterion.
boolWhether a binding matches, not pressed state.
ActionSetDeadzonevoid
public static void ActionSetDeadzone(StringName action, float deadzone);Changes an existing action's stored deadzone. Does not create a missing action, assign a device, or save configuration to disk.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
deadzone | float | — |
actionPreviously created action name.
deadzoneNew value; for a normal analog wrapper, validate finiteness and 0 ≤ value < 1. The native setter stores the number without that restriction.
AddActionvoid
public static void AddAction(StringName action, float deadzone = 0.2f);Creates a runtime action. An existing name is rejected with an error. This call alone neither adds physical bindings nor saves settings to disk.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
deadzone | float | 0.2f |
actionUnique new action name. Check HasAction for an existing action.
deadzoneAction deadzone, default 0.2 in SDK 1.0.0. Validate in your code; action creation does not perform the same range validation as the tutorial wrapper.
EraseActionvoid
public static void EraseAction(StringName action);Removes an existing runtime-map action and its bindings. Does not save ProjectSettings. Missing names produce diagnostics; check HasAction first. Do not rely on map-entry removal as a substitute for explicit ActionRelease in your own held-state management.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting action name; only AddAction accepts a new unique name.
EventIsActionbool
public static bool EventIsAction(InputEvent @event, StringName action, bool exactMatch = false);Tests whether an event matches an existing action, not current Input state. Default exactMatch=false permits extra modifiers; true requires exact action matching. Release events can match too. InputEventAction is compared by name even without physical bindings. This query injects no event and presses no action.
| Name | Type | Default |
|---|---|---|
event | InputEvent | — |
action | StringName | — |
exactMatch | bool | false |
eventNon-null InputEvent to match/bind; wrapper identity is generally not the matching criterion.
actionExisting action name; only AddAction accepts a new unique name.
exactMatchtrue requires exact action matching; false permits extra modifiers. Not a pressed flag.
boolEvent-name/binding match, independently of current Input state.
GetActionDescriptionstring
public static string GetActionDescription(StringName action);In 1.0.0 builds display text from InputEventKey bindings only, joined by localized “or”. Mouse/joypad bindings are omitted: the no-bound-inputs fallback can appear despite them. Use ActionGetEvents with your own labels for a complete list. Not an ID or stable persistence format.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting action name; only AddAction accepts a new unique name.
stringDisplay text for key bindings or a localized fallback, not a complete device list.
GetActionsReckfell.Collections.Array<StringName>
public static Reckfell.Collections.Array<StringName> GetActions();Returns a snapshot of registered action names, including built-ins and runtime additions. Not a list of user-only bindings or a sorted-order contract. Container edits do not change the map.
Reckfell.Collections.Array<StringName>Typed Array<StringName> of names with no sorting promise.
HasActionbool
public static bool HasAction(StringName action);Tests name registration. true guarantees neither a physical binding, a usable binding nor held state.
| Name | Type | Default |
|---|---|---|
action | StringName | — |
actionExisting action name; only AddAction accepts a new unique name.
booltrue if the name is registered, including actions without bindings.
LoadFromProjectSettingsvoid
public static void LoadFromProjectSettings();Clears the runtime map and reloads input/* actions from current ProjectSettings, then emits ProjectSettingsLoaded. Replacement rather than merge: temporary actions/rebindings are lost. Writes no settings to disk and does not automatically reread project.reckfell from disk. Prepare the desired project settings before calling.
Signals and events1
ProjectSettingsLoadedEvent
public static event Action ProjectSettingsLoaded;Argument-free event after LoadFromProjectSettings completes. Does not mean a saved user remap was loaded, a key was pressed or a file was written. Subscribe before reloading and unsubscribe when the receiver is finished.