UInputKeySelector

A widget for selecting a single key or a single key with a modifier.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Components/InputKeySelector.h

Include

#include "Components/InputKeySelector.h"

Syntax

class UInputKeySelector : public UWidget

Remarks

A widget for selecting a single key or a single key with a modifier.

Variables

Name Description

Public variable

bool

 

bAllowGamepadKeys

When true gamepad keys are allowed in the input chord representing the selected key, otherwise they are ignored.

Public variable

bool

 

bAllowModifierKeys

When true modifier keys such as control and alt are allowed in the input chord representing the selected key, if false modifier keys are ignored.

Public variable

TArray< FKey >

 

EscapeKeys

When true gamepad keys are allowed in the input chord representing the selected key, otherwise they are ignored.

Public variable

FText

 

KeySelectionText

Sets the text which is displayed while selecting keys.

Public variable

FMargin

 

Margin

The amount of blank space around the text used to display the currently selected key.

Public variable

FText

 

NoKeySpecifiedText

Sets the text to display when no key text is available or not selecting a key.

Public variable

FOnIsSelectingK...

 

OnIsSelectingKeyChanged

Called whenever the key selection mode starts or stops.

Public variable

FOnKeySelected

 

OnKeySelected

Called whenever a new key is selected by the user.

Public variable

FInputChord

 

SelectedKey

The currently selected key chord.

Public variable

FTextBlockStyle

 

TextStyle

The button style used at runtime

Public variable

FButtonStyle

 

WidgetStyle

The button style used at runtime

Constructors

Name Description

Public function

UInputKeySelector

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

bool

 

GetIsSelectingKey()

Returns true if the widget is currently selecting a key, otherwise returns false.

Public function

void

 

SetAllowGamepadKeys

(
    bool bInAllowGamepadKeys
)

Sets whether or not gamepad keys are allowed in the selected key.

Public function

void

 

SetAllowModifierKeys

(
    bool bInAllowModifierKeys
)

Sets whether or not modifier keys are allowed in the selected key.

Public function

void

 

SetButtonStyle

(
    const FButtonStyle* ButtonStyl...
)

Sets the style of the button used to start key selection mode.

Public function

void

 

SetEscapeKeys

(
    const TArray< FKey >& InKeys
)

Sets escape keys.

Public function

void

 

SetKeySelectionText

(
    FText InKeySelectionText
)

Sets the text which is displayed while selecting keys.

Public function

void

 

SetNoKeySpecifiedText

(
    FText InNoKeySpecifiedText
)

Sets the text to display when no key text is available or not selecting a key.

Public function

void

 

SetSelectedKey

(
    const FInputChord& InSelectedKey
)

Sets the currently selected key.

Public function

void

 

SetTextBlockVisibility

(
    const ESlateVisibility InVisibility
)

Sets the visibility of the text block.

Overridden from UWidget

Name Description

Public function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Public function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Protected function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Protected function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Protected function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Classes

Deprecated Variables

Name Description

Public variable

FLinearColor

 

ColorAndOpacity_DEPRECATED

Public variable

FSlateFontInfo

 

Font_DEPRECATED

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss