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)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.

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) –

Returns

Return type

bool

query_keys_mapped_to_action(action)

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

Parameters

action (InputAction) –

Returns

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)None

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

Parameters

mapping_context (InputMappingContext) – Context to remove from the player

request_rebuild_control_mappings(force_immediately=False)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

force_immediately (bool) – THe mapping changes will be applied synchronously, rather than at the end of the frame, making them available to the input system on the same frame.