UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FInputBindingManager Class Reference

#include <InputBindingManager.h>

Public Types

enum class  ECommandFilterType { None , DenyList , AllowList }
 

Public Member Functions

virtual ~FInputBindingManager ()
 
SLATE_API void GetKnownInputContexts (TArray< TSharedPtr< FBindingContext > > &OutInputContexts) const
 
SLATE_API TSharedPtr< FBindingContextGetContextByName (const FName &InContextName)
 
SLATE_API void RemoveContextByName (const FName &InContextName)
 
SLATE_API void CreateInputCommand (const TSharedRef< FBindingContext > &InBindingContext, TSharedRef< FUICommandInfo > InUICommandInfo)
 
SLATE_API void RemoveInputCommand (const TSharedRef< FBindingContext > &InBindingContext, TSharedRef< FUICommandInfo > InUICommandInfo)
 
SLATE_API const TSharedPtr< FUICommandInfoGetCommandInfoFromInputChord (const FName InBindingContext, const FInputChord &InChord, bool bCheckDefault) const
 
SLATE_API const TSharedPtr< FUICommandInfoFindCommandInContext (const FName InBindingContext, const FInputChord &InChord, bool bCheckDefault) const
 
SLATE_API const TSharedPtr< FUICommandInfoFindCommandInContext (const FName InBindingContext, const FName CommandName) const
 
virtual SLATE_API void NotifyActiveChordChanged (const FUICommandInfo &CommandInfo, const EMultipleKeyBindingIndex InChordIndex)
 
SLATE_API void SaveInputBindings ()
 
SLATE_API void RemoveUserDefinedChords ()
 
SLATE_API void GetCommandInfosFromContext (const FName InBindingContext, TArray< TSharedPtr< FUICommandInfo > > &OutCommandInfos) const
 
FDelegateHandle RegisterUserDefinedChordChanged (const FOnUserDefinedChordChanged::FDelegate &Delegate)
 
void UnregisterUserDefinedChordChanged (FDelegateHandle DelegateHandle)
 
SLATE_API bool GetUserDefinedChord (const FName InBindingContext, const FName InCommandName, const EMultipleKeyBindingIndex InChordIndex, FInputChord &OutUserDefinedChord)
 
SLATE_API bool GetProjectDefinedChord (const FName InBindingContext, const FName InCommandName, const EMultipleKeyBindingIndex InChordIndex, FInputChord &OutUserDefinedChord)
 
SLATE_API void AddCommandFilter (const FName InOwnerName, const FName InBindingContext, const FName InCommandName, const ECommandFilterType FilterType)
 
SLATE_API void UnregisterCommandFilterOwner (const FName InOwnerName)
 
SLATE_API bool CommandPassesFilter (const FName InBindingContext, const FName InCommandName) const
 
SLATE_API bool RegisterCommandList (const ::FName InBindingContext, TSharedRef< FUICommandList > CommandList) const
 
SLATE_API TSharedPtr< FUICommandListRegisterNewCommandList (const FName InBindingContext) const
 
SLATE_API bool UnregisterCommandList (const ::FName InBindingContext, TSharedRef< FUICommandList > CommandList) const
 

Static Public Member Functions

static SLATE_API FInputBindingManagerGet ()
 

Public Attributes

FOnRegisterCommandList OnRegisterCommandList
 
FOnRegisterCommandList OnUnregisterCommandList
 

Detailed Description

Manager responsible for creating and processing input bindings.

Member Enumeration Documentation

◆ ECommandFilterType

Enumerator
None 
DenyList 
AllowList 

Constructor & Destructor Documentation

◆ ~FInputBindingManager()

virtual FInputBindingManager::~FInputBindingManager ( )
inlinevirtual

Virtual destructor

Member Function Documentation

◆ AddCommandFilter()

void FInputBindingManager::AddCommandFilter ( const FName  InOwnerName,
const FName  InBindingContext,
const FName  InCommandName,
const ECommandFilterType  FilterType 
)

Filters a command by name

Parameters
InOwnerNameThe name of the owner adding filter so it can be unregistered later
InBindingContextThe context in which the command is active
InCommandNameThe name of the command
FilterTypeType of filter to apply

◆ CommandPassesFilter()

bool FInputBindingManager::CommandPassesFilter ( const FName  InBindingContext,
const FName  InCommandName 
) const

Command passes allow/deny list filters

Parameters
InBindingContextThe context in which the command is active
InCommandNameThe name of the command

◆ CreateInputCommand()

void FInputBindingManager::CreateInputCommand ( const TSharedRef< FBindingContext > &  InBindingContext,
TSharedRef< FUICommandInfo InUICommandInfo 
)

Creates an input command from the specified user interface action

Parameters
InBindingContextThe context where the command is valid
InUICommandInfoThe user interface action to create the input command from Will automatically bind the user interface action to the command specified by the action so when the command's chord is pressed, the action is executed

◆ FindCommandInContext() [1/2]

const TSharedPtr< FUICommandInfo > FInputBindingManager::FindCommandInContext ( const FName  InBindingContext,
const FInputChord InChord,
bool  bCheckDefault 
) const

Finds the command in the provided context which uses the provided input chord

Parameters
InBindingContextThe binding context name
InChordThe chord to check against when looking for commands
bCheckDefaultWhether or not to check the default chord of commands instead of active chords
OutActiveChordIndexThe index into the commands active chord array where the passed in chord was matched. INDEX_NONE if bCheckDefault is true or nothing was found.

◆ FindCommandInContext() [2/2]

const TSharedPtr< FUICommandInfo > FInputBindingManager::FindCommandInContext ( const FName  InBindingContext,
const FName  CommandName 
) const

Finds the command in the provided context which has the provided name

Parameters
InBindingContextThe binding context name
CommandNameThe name of the command to find

◆ Get()

FInputBindingManager & FInputBindingManager::Get ( )
static
Returns
The instance of this manager

◆ GetCommandInfoFromInputChord()

const TSharedPtr< FUICommandInfo > FInputBindingManager::GetCommandInfoFromInputChord ( const FName  InBindingContext,
const FInputChord InChord,
bool  bCheckDefault 
) const

Returns a command info that is has the same active chord as the provided chord and is in the same binding context or parent context

Parameters
InBindingContextThe context in which the command is valid
InChordThe chord to match against commands
bCheckDefaultWhether or not to check the default chord. Will check the active chord if false
Returns
A pointer to the command info which has the InChord as its active chord or null if one cannot be found

◆ GetCommandInfosFromContext()

void FInputBindingManager::GetCommandInfosFromContext ( const FName  InBindingContext,
TArray< TSharedPtr< FUICommandInfo > > &  OutCommandInfos 
) const

Returns all known command infos for a given binding context

Parameters
InBindingContextThe binding context to get command infos from
OutCommandInfosThe list of command infos for the binding context

◆ GetContextByName()

TSharedPtr< FBindingContext > FInputBindingManager::GetContextByName ( const FName InContextName)

Look up a binding context by name.

◆ GetKnownInputContexts()

void FInputBindingManager::GetKnownInputContexts ( TArray< TSharedPtr< FBindingContext > > &  OutInputContexts) const

Returns a list of all known input contexts

Parameters
OutInputContextsThe generated list of contexts
Returns
A list of all known input contexts

◆ GetProjectDefinedChord()

SLATE_API bool FInputBindingManager::GetProjectDefinedChord ( const FName  InBindingContext,
const FName  InCommandName,
const EMultipleKeyBindingIndex  InChordIndex,
FInputChord OutUserDefinedChord 
)

Gets the project defined chord (if any) from the provided command name

Parameters
InBindingContextThe context in which the command is active
InCommandNameThe name of the command to get the chord from
ChordIndexThe index of the key binding (in the multiple key bindings array)

◆ GetUserDefinedChord()

bool FInputBindingManager::GetUserDefinedChord ( const FName  InBindingContext,
const FName  InCommandName,
const EMultipleKeyBindingIndex  InChordIndex,
FInputChord OutUserDefinedChord 
)

Gets the user defined chord (if any) from the provided command name

Parameters
InBindingContextThe context in which the command is active
InCommandNameThe name of the command to get the chord from
ChordIndexThe index of the key binding (in the multiple key bindings array)

Gets the user defined chord (if any) from the provided command name

Parameters
InBindingContextThe context in which the command is active
InCommandNameThe name of the command to get the chord from

◆ NotifyActiveChordChanged()

void FInputBindingManager::NotifyActiveChordChanged ( const FUICommandInfo CommandInfo,
const EMultipleKeyBindingIndex  InChordIndex 
)
virtual

Called when the active chord is changed on a command

Parameters
CommandInfoThe command that had the active chord changed.

◆ RegisterCommandList()

bool FInputBindingManager::RegisterCommandList ( const ::FName  InBindingContext,
TSharedRef< FUICommandList CommandList 
) const

Exposes the given command list and its context to all OnRegisterCommandList subscribers

Parameters
InBindingContextThe context in which the command list is active
CommandListThe command list to expose to subscribers

◆ RegisterNewCommandList()

TSharedPtr< FUICommandList > FInputBindingManager::RegisterNewCommandList ( const FName  InBindingContext) const

Exposes a new given command list from the given context to all OnRegisterCommandList subscribers

Parameters
InBindingContextThe context in which the command list is active
Returns
The new command list exposed to subscribers

◆ RegisterUserDefinedChordChanged()

FDelegateHandle FInputBindingManager::RegisterUserDefinedChordChanged ( const FOnUserDefinedChordChanged::FDelegate &  Delegate)
inline

Registers a delegate to be called when a user-defined chord is edited

◆ RemoveContextByName()

void FInputBindingManager::RemoveContextByName ( const FName InContextName)

Remove the context with this name

◆ RemoveInputCommand()

void FInputBindingManager::RemoveInputCommand ( const TSharedRef< FBindingContext > &  InBindingContext,
TSharedRef< FUICommandInfo InUICommandInfo 
)

Removes an input command, allowing a new one to take its place

Parameters
InBindingContextThe context where the command is valid
InUICommandInfoThe user interface action to remove

◆ RemoveUserDefinedChords()

void FInputBindingManager::RemoveUserDefinedChords ( )

Removes any user defined chords

◆ SaveInputBindings()

void FInputBindingManager::SaveInputBindings ( )

Saves the user defined chords to a json file

◆ UnregisterCommandFilterOwner()

void FInputBindingManager::UnregisterCommandFilterOwner ( const FName  InOwnerName)

Removes all filters associated with an owner

◆ UnregisterCommandList()

bool FInputBindingManager::UnregisterCommandList ( const ::FName  InBindingContext,
TSharedRef< FUICommandList CommandList 
) const

Exposes the given command list and its context to all OnUnregisterCommandList subscribers

Parameters
InBindingContextThe context in which the command list is active
CommandListThe command list to expose to subscribers

◆ UnregisterUserDefinedChordChanged()

void FInputBindingManager::UnregisterUserDefinedChordChanged ( FDelegateHandle  DelegateHandle)
inline

Unregisters a delegate to be called when a user-defined chord is edited

Member Data Documentation

◆ OnRegisterCommandList

FOnRegisterCommandList FInputBindingManager::OnRegisterCommandList

A delegate for systems to subscribe to any other system exposing their command lists

◆ OnUnregisterCommandList

FOnRegisterCommandList FInputBindingManager::OnUnregisterCommandList

A delegate for systems to subscribe to any other system unregistering their command lists


The documentation for this class was generated from the following files: