Limen Framework 0.1 Help

ULimenKeyBindSubsystem

Overview

The ULimenKeyBindSubsystem is a subsystem that manages input key bindings for players and pawns. It inherits from ULimenModularSettingsSubsystem and provides methods to get input mapping contexts based on player controller or pawn classes, as well as functions to retrieve and set action key mappings. The subsystem also handles the initialization of default settings and broadcasts updates when a key binding is applied.

Properties

Type

Name

Access

Description

TObjectPtr<const [ULimenKeyBindDeveloperSettings](LimenKeyBindDeveloperSettings.md)>

SubsystemSettings

Private

Stores the developer settings for the subsystem.

TMap<TSoftClassPtr<APlayerController>, UInputMappingContext*>

PlayerMappingContexts

Private

Maps player controller classes to their respective input mapping contexts.

TMap<TSoftClassPtr<APawn>, UInputMappingContext*>

PawnMappingContexts

Private

Maps pawn classes to their respective input mapping contexts.

TArray<TStrongObjectPtr<UInputMappingContext>>

MappingContexts

Private

Array of strong pointers to all input mapping contexts managed by the subsystem.

Functions

Return Type

Signature

Description

bool

ShouldCreateSubsystem(UObject* Outer) const

Determines if the subsystem should be created based on the outer object and developer settings.

void

Initialize(FSubsystemCollectionBase& Collection)

Initializes the subsystem by loading default settings, creating input mapping contexts, and adding settings to the collection.

void

Deinitialize()

Cleans up resources when the subsystem is being destroyed.

template<typename T> UInputMappingContext* GetPlayerInputMappingContext() const

Retrieves an input mapping context for a player controller class.

template<typename T> UInputMappingContext* GetPawnInputMappingContext() const

Retrieves an input mapping context for a pawn class.

UInputMappingContext* GetPlayerInputMappingContext(const APlayerController* PlayerController) const

Retrieves an input mapping context for a specific player controller instance.

UInputMappingContext* GetPawnInputMappingContext(const APawn* Pawn) const

Retrieves an input mapping context for a specific pawn instance.

UInputMappingContext* GetPlayerInputMappingContext(const TSubclassOf<APlayerController>& PlayerControllerClass) const

Retrieves an input mapping context for a player controller class.

UInputMappingContext* GetPawnInputMappingContext(const TSubclassOf<APawn>& Pawn) const

Retrieves an input mapping context for a pawn class.

UInputMappingContext* GetInputMappingByAction(const UInputAction* Action) const

Retrieves the input mapping context that contains a specific action key mapping.

FEnhancedActionKeyMapping& GetActionKeyMappingByAction(const UInputAction* Action)

Retrieves the action key mapping for a specific action from any input mapping context.

bool SetActionKeyMappingByAction(const UInputAction* Action, const FEnhancedActionKeyMapping& InActionKeyMapping)

Sets the action key mapping for a specific action in all relevant input mapping contexts.

void LoadDefaultSettingsList()

Loads default settings from developer settings and initializes them.

void SettingApplied(const [ULimenSetting](LimenSetting.md)* Setting)

Broadcasts an update when a key binding is applied, providing the updated action key mapping.

Usage & Implementation Notes

  • Threading Constraints: This subsystem operates on the game thread.

  • Replication Requirements: None.

  • Memory Lifetime Management: The subsystem manages the lifetime of input mapping contexts and settings through strong pointers.

  • Initialization Dependencies: Depends on ULimenKeyBindDeveloperSettings for configuration.

22 May 2026