SInputKeySelector

A widget for selecting keys or input chords.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Widgets/Input/SInputKeySelector.h

Include

#include "Widgets/Input/SInputKeySelector.h"

Syntax

class SInputKeySelector : public SCompoundWidget

Remarks

A widget for selecting keys or input chords.

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Public function Const

bool

 

GetIsSelectingKey()

Returns true whenever key selection mode is active, otherwise returns false.

Public function Const

FInputChord

 

GetSelectedKey()

Gets the currently selected key chord.

Public function

void

 

SetAllowGamepadKeys

(
    const bool bInAllowGamepadKeys
)

When true gamepad keys are captured in the selected key chord, otherwise they are ignored.

Public function

void

 

SetAllowModifierKeys

(
    const bool bInAllowModifierKeys
)

When true modifier keys are captured in the selected key chord, otherwise they are ignored.

Public function

void

 

SetButtonStyle

(
    const FButtonStyle* ButtonStyl...
)

Sets the style of the button which is used enter key selection mode.

Public function

void

 

SetEscapeKeys

(
    TArray< FKey > InEscapeKeys
)

Sets the escape keys to check against.

Public function

void

 

SetKeySelectionText

(
    FText InKeySelectionText
)

Sets the text which is displayed when selecting a key.

Public function

void

 

SetMargin

(
    TAttribute< FMargin > InMargin
)

Sets the margin around the text used to display the currently selected key

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

(
    TAttribute< FInputChord > InSelecte...
)

Sets the currently selected key chord.

Public function

void

 

SetTextBlockVisibility

(
    EVisibility InVisibility
)

Sets the visibility of the text block.

Public function

void

 

SetTextStyle

(
    const FTextBlockStyle* InTextS...
)

Sets the style of the text on the button which is used enter key selection mode.

Overridden from SWidget

Name Description

Public function Virtual

void

 

OnFocusLost

(
    const FFocusEvent& InFocusEvent
)

Called when this widget loses focus. This event does not bubble.

Public function Virtual

FReply

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called after a key is pressed when this widget has focus (this event bubbles if not handled)

Public function Virtual

FReply

 

OnKeyUp

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called after a key is released when this widget has focus

Public function Virtual

FReply

 

OnMouseButtonDown

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

MOUSE INPUT The system calls this method to notify the widget that a mouse button was pressed within it.

Public function Virtual

FNavigationR...

 

OnNavigation

(
    const FGeometry& MyGeometry,
    const FNavigationEvent& InNavigati...
)

Called when navigation is requested e.g. Left Joystick, Direction Pad, Arrow Keys can generate navigation events.

Public function Virtual

FReply

 

OnPreviewKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Called after a key is pressed when this widget or a child of this widget has focus If a widget handles this event, OnKeyDown will not be passed to the focused widget.

Public function Virtual

FReply

 

OnPreviewMouseButtonDown

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Just like OnMouseButtonDown, but tunnels instead of bubbling.

Public function Virtual Const

bool

 

SupportsKeyboardFocus()

Checks to see if this widget supports keyboard focus. Override this in derived classes.

Classes

Name

Description

Public struct

FArguments

Typedefs

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