unreal.EnhancedPlayerMappableKeyProfile

class unreal.EnhancedPlayerMappableKeyProfile(outer: Object | None = None, name: Name | str = 'None')

Bases: Object

Represents one “Profile” that a user can have for their player mappable keys

C++ Source:

  • Plugin: EnhancedInput

  • Module: EnhancedInput

  • File: EnhancedInputUserSettings.h

Editor Properties: (see get_editor_property/set_editor_property)

  • display_name (Text): [Read-Write] The localized display name of this profile

  • owning_user_id (PlatformUserId): [Read-Only] The platform user id of the owning Local Player of this profile.

  • player_mapped_keys (Map[Name, KeyMappingRow]): [Read-Write] A map of “Mapping Row Name” to all key mappings associated with it. Note: Dirty mappings will be serialized from UEnhancedInputUserSettings::Serialize

  • profile_identifier (GameplayTag): [Read-Write] The ID of this profile. This can be used by each Key Mapping to filter down which profile is required for it be equipped.

property display_name: Text

[Read-Write] The localized display name of this profile

Type:

(Text)

does_mapping_pass_query_options(player_mapping, options) bool

Returns true if the given player key mapping passes the query filter provided.

Parameters:
Return type:

bool

dump_profile_to_log() None

A helper function to print out all the current profile settings to the log.

get_mapped_keys_in_row(mapping_name) -> (int32, out_keys=Array[Key])

OUT

Parameters:

mapping_name (Name) –

Returns:

out_keys (Array[Key]):

Return type:

Array[Key]

get_mapping_names_for_key(key) -> (int32, out_mapping_names=Array[Name])

OUT

Parameters:

key (Key) –

Returns:

out_mapping_names (Array[Name]):

Return type:

Array[Name]

get_player_mapping_rows() Map[Name, KeyMappingRow]

Get all known key mappings for this profile.

This returns a map of “Mapping Name” -> Player Mappings to that name

Return type:

Map[Name, KeyMappingRow]

get_profile_display_name() Text

Get the localized display name for this profile

Return type:

Text

get_profile_identifer() GameplayTag

Get Profile Identifer

Return type:

GameplayTag

k2_find_key_mapping(args) PlayerKeyMapping

K2 Find Key Mapping

Parameters:

args (MapPlayerKeyArgs) –

Returns:

out_key_mapping (PlayerKeyMapping):

Return type:

PlayerKeyMapping

property owning_user_id: PlatformUserId

[Read-Only] The platform user id of the owning Local Player of this profile.

Type:

(PlatformUserId)

property player_mapped_keys: None

[Read-Only] A map of “Mapping Row Name” to all key mappings associated with it. Note: Dirty mappings will be serialized from UEnhancedInputUserSettings::Serialize

Type:

(Map[Name, KeyMappingRow])

property profile_identifier: GameplayTag

[Read-Only] The ID of this profile. This can be used by each Key Mapping to filter down which profile is required for it be equipped.

Type:

(GameplayTag)

query_player_mapped_keys(options) -> (int32, out_keys=Array[Key])

OUT

Parameters:

options (PlayerMappableKeyQueryOptions) –

Returns:

out_keys (Array[Key]):

Return type:

Array[Key]

reset_mapping_to_default(mapping_name) None

Resets every player key mapping to this mapping back to it’s default value

Parameters:

mapping_name (Name) –

reset_to_default() None

Resets all the key mappings in this profile to their default value from their Input Mapping Context.

set_display_name(new_display_name) None

Set Display Name

Parameters:

new_display_name (Text) –

to_string() str

Returns a string that can be used to debug the current key mappings.

Return type:

str