unreal.EnhancedInputSubsystemInterface
¶
- class unreal.EnhancedInputSubsystemInterface(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Interface
Enhanced Input Subsystem Interface
C++ Source:
Plugin: EnhancedInput
Module: EnhancedInput
File: EnhancedInputSubsystemInterface.h
- add_mapping_context(mapping_context, priority, options=[True, False, 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, False]) None ¶
Add Player Mappable Config deprecated: AddPlayerMappableConfig has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
config (PlayerMappableInputConfig) –
options (ModifyContextOptions) –
- add_player_mapped_key(mapping_name: Name, new_key: Key, key_slot: PlayerMappableKeySlotData = Ellipsis, options: ModifyContextOptions = Ellipsis) int ¶
deprecated: ‘add_player_mapped_key’ was renamed to ‘k2_add_player_mapped_key_in_slot’.
- get_all_player_mappable_action_key_mappings() Array[EnhancedActionKeyMapping] ¶
Get an array of the currently applied key mappings that are marked as Player Mappable.
- Return type:
- get_all_player_mapped_keys(mapping_name) Array[Key] ¶
Get All Player Mapped Keys deprecated: GetAllPlayerMappedKeys has been deprecated, please use UEnhancedInputUserSettings instead.
- get_player_mapped_key(mapping_name: Name, key_slot: PlayerMappableKeySlotData = Ellipsis) Key ¶
deprecated: ‘get_player_mapped_key’ was renamed to ‘k2_get_player_mapped_key_in_slot’.
- get_user_settings() EnhancedInputUserSettings ¶
Get User Settings
- Return type:
- has_mapping_context(mapping_context) int32 or None ¶
Check if a mapping context is applied to this subsystem’s owner.
- Parameters:
mapping_context (InputMappingContext) – The mapping context to search for on the subsystem’s owner.
- Returns:
True if the mapping context is applied
out_found_priority (int32): The priority of the mapping context if it is applied. -1 if the context is not applied
- Return type:
int32 or None
- 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:
action (InputAction) – The Input Action to set inject input for
raw_value (InputActionValue) – The value to set the action to
modifiers (Array[InputModifier]) – The modifiers to apply to the injected input.
triggers (Array[InputTrigger]) – The triggers to apply to the injected input.
- inject_input_for_player_mapping(mapping_name, 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:
mapping_name (Name) – The name of the player mapping that can be used for look up an associated UInputAction object.
raw_value (InputActionValue) – The value to set the action to
modifiers (Array[InputModifier]) – The modifiers to apply to the injected input.
triggers (Array[InputTrigger]) – The triggers to apply to the injected input.
- 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.
- inject_input_vector_for_player_mapping(mapping_name, 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:
mapping_name (Name) – The name of the player mapping that can be used for look up an associated UInputAction object.
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.
- k2_add_player_mapped_key_in_slot(mapping_name, new_key, key_slot=[0], options=[True, False, False]) int32 ¶
K2 Add Player Mapped Key in Slot deprecated: AddPlayerMappedKeyInSlot has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
mapping_name (Name) –
new_key (Key) –
key_slot (PlayerMappableKeySlotData) –
options (ModifyContextOptions) –
- Return type:
int32
- k2_get_player_mapped_key_in_slot(mapping_name, key_slot=[0]) Key ¶
K2 Get Player Mapped Key in Slot deprecated: K2_GetPlayerMappedKeyInSlot has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
mapping_name (Name) –
key_slot (PlayerMappableKeySlotData) –
- Return type:
- k2_remove_player_mapped_key_in_slot(mapping_name, key_slot=[0], options=[True, False, False]) int32 ¶
Removes player mapped key in the KeySlot for mapping of MappingName. Requests a rebuild of the player mappings. deprecated: K2_RemovePlayerMappedKeyInSlot has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
mapping_name (Name) –
key_slot (PlayerMappableKeySlotData) –
options (ModifyContextOptions) –
- Returns:
The number of mappings that have been removed
- Return type:
int32
- query_keys_mapped_to_action(action) Array[Key] ¶
Returns the keys mapped to the given action in the active input mapping contexts.
- Parameters:
action (InputAction) –
- Return type:
- query_map_key_in_active_context_set(input_context, action, key, blocking_issues) -> (MappingQueryResult, out_issues=Array[MappingQueryIssue])¶
= DefaultMappingIssues::StandardFatal
- Parameters:
input_context (InputMappingContext) –
action (InputAction) –
key (Key) –
blocking_issues (MappingQueryIssueFlag) –
- Returns:
out_issues (Array[MappingQueryIssue]):
- Return type:
- query_map_key_in_context_set(prioritized_active_contexts, input_context, action, key, blocking_issues) -> (MappingQueryResult, out_issues=Array[MappingQueryIssue])¶
= DefaultMappingIssues::StandardFatal
- Parameters:
prioritized_active_contexts (Array[InputMappingContext]) –
input_context (InputMappingContext) –
action (InputAction) –
key (Key) –
blocking_issues (MappingQueryIssueFlag) –
- Returns:
out_issues (Array[MappingQueryIssue]):
- Return type:
- remove_all_player_mapped_keys(options=[True, False, False]) None ¶
Remove All Player Mapped Keys deprecated: RemoveAllPlayerMappedKeys has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
options (ModifyContextOptions) –
- remove_all_player_mapped_keys_for_mapping(mapping_name, options=[True, False, False]) int32 ¶
Remove All Player Mapped Keys for Mapping deprecated: RemoveAllPlayerMappedKeysForMapping has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
mapping_name (Name) –
options (ModifyContextOptions) –
- Return type:
int32
- remove_mapping_context(mapping_context, options=[True, False, False]) 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
options (ModifyContextOptions) – Options to consider when removing this input mapping context
- remove_player_mappable_config(config, options=[True, False, False]) None ¶
Remove Player Mappable Config deprecated: RemovePlayerMappableConfig has been deprecated, please use UEnhancedInputUserSettings instead.
- Parameters:
config (PlayerMappableInputConfig) –
options (ModifyContextOptions) –
- remove_player_mapped_key(mapping_name: Name, key_slot: PlayerMappableKeySlotData = Ellipsis, options: ModifyContextOptions = Ellipsis) int ¶
deprecated: ‘remove_player_mapped_key’ was renamed to ‘k2_remove_player_mapped_key_in_slot’.
- request_rebuild_control_mappings(options=[True, False, 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:
options (ModifyContextOptions) – Options to consider when removing this input mapping context
rebuild_type (InputMappingRebuildType) –
- start_continuous_input_injection_for_action(action, raw_value, modifiers, triggers) None ¶
Starts simulation of input via injection. This injects the given input every tick until it is stopped with StopContinuousInputInjectionForAction.
- Parameters:
action (InputAction) – The Input Action to set inject input for
raw_value (InputActionValue) – 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.
- start_continuous_input_injection_for_player_mapping(mapping_name, raw_value, modifiers, triggers) None ¶
Starts simulation of input via injection. This injects the given input every tick until it is stopped with StopContinuousInputInjectionForAction.
- Parameters:
mapping_name (Name) – The name of the player mapping that can be used for look up an associated UInputAction object.
raw_value (InputActionValue) – 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.
- stop_continuous_input_injection_for_action(action) None ¶
Stops continuous input injection for the given action.
- Parameters:
action (InputAction) – The action to stop injecting input for