unreal.EnhancedInputSubsystemInterface

class unreal.EnhancedInputSubsystemInterface(outer=None, name='None')

Bases: unreal.Interface

Enhanced Input Subsystem Interface

C++ Source:

  • Plugin: EnhancedInput

  • Module: EnhancedInput

  • File: EnhancedInputSubsystemInterface.h

add_mapping_context(mapping_context, priority, options=[True, False]) None

Add a control mapping context.

Parameters
  • mapping_context (InputMappingContext) – A set of key to action mappings to apply to this player

  • priority (int32) – Higher priority mappings will be applied first and, if they consume input, will block lower priority mappings.

  • options (ModifyContextOptions) – Options to consider when adding this mapping context.

add_player_mappable_config(config, options=[True, False]) None

Adds all the input mapping contexts inside of this mappable config.

Parameters
add_player_mapped_key(mapping_name, new_key, options=[True, False]) int32

Replace any currently applied mappings to this key mapping with the given new one. Requests a rebuild of the player mappings.

Parameters
Returns

The number of mappings that have been replaced

Return type

int32

clear_all_mappings() None

Remove all applied mapping contexts.

has_mapping_context(mapping_context) bool
Check if a mapping context is applied to this subsystem’s owner.

// TODO: BlueprintPure would be nicer. Move into library?

Parameters

mapping_context (InputMappingContext) –

Return type

bool

inject_input_for_action(action, raw_value, modifiers, triggers) None

Input simulation via injection. Runs modifiers and triggers delegates as if the input had come through the underlying input system as FKeys. Applies action modifiers and triggers on top.

Parameters
inject_input_vector_for_action(action, value, modifiers, triggers) None

Input simulation via injection. Runs modifiers and triggers delegates as if the input had come through the underlying input system as FKeys. Applies action modifiers and triggers on top.

Parameters
  • action (InputAction) – The Input Action to set inject input for

  • value (Vector) – The value to set the action to (the type will be controlled by the Action)

  • modifiers (Array(InputModifier)) – The modifiers to apply to the injected input.

  • triggers (Array(InputTrigger)) – The triggers to apply to the injected input.

query_keys_mapped_to_action(action)

Returns the keys mapped to the given action in the active input mapping contexts.

Parameters

action (InputAction) –

Return type

Array(Key)

query_map_key_in_active_context_set(input_context, action, key, blocking_issues) -> (MappingQueryResult, out_issues=Array(MappingQueryIssue))

= DefaultMappingIssues::StandardFatal

Parameters
Returns

out_issues (Array(MappingQueryIssue)):

Return type

Array(MappingQueryIssue)

query_map_key_in_context_set(prioritized_active_contexts, input_context, action, key, blocking_issues) -> (MappingQueryResult, out_issues=Array(MappingQueryIssue))

= DefaultMappingIssues::StandardFatal

Parameters
Returns

out_issues (Array(MappingQueryIssue)):

Return type

Array(MappingQueryIssue)

remove_mapping_context(mapping_context, options=[True, False]) None

Remove a specific control context. This is safe to call even if the context is not applied.

Parameters
remove_player_mappable_config(config, options=[True, False]) None

Removes all the input mapping contexts inside of this mappable config.

Parameters
remove_player_mapped_key(mapping_name, options=[True, False]) int32

Remove any player mappings with to the given action Requests a rebuild of the player mappings.

Parameters
Returns

The number of mappings that have been removed

Return type

int32

request_rebuild_control_mappings(options=[True, False], rebuild_type=InputMappingRebuildType.REBUILD) None

Flag player for reapplication of all mapping contexts at the end of this frame. This is called automatically when adding or removing mappings contexts.

Parameters