SKeySelector

Widget for selecting an input key

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/SKeySelector.h

Include

#include "SKeySelector.h"

Syntax

class SKeySelector : public SCompoundWidget

Remarks

Widget for selecting an input key

Variables

Name Description

Protected variable

bool

 

bListenForNextInput

Protected variable

FSlateFontInfo

 

CategoryFont

Font used for category tree entries

Protected variable

TAttribute< TOp...

 

CurrentKey

The key attribute that we're modifying with this widget, or an empty optional if the key contains multiple values

Protected variable

TArray< FKeyTre...

 

FilteredKeyTreeRoot

Array containing a filtered list, according to the text in the searchbox

Protected variable

TSharedPtr< SSe...

 

FilterTextBox

Protected variable

TSharedPtr< SCo...

 

KeyComboButton

Combo Button that shows current key and icon

Protected variable

FSlateFontInfo

 

KeyFont

Font used for key tree entries

Protected variable

TArray< FKeyTre...

 

KeyTreeRoot

Array containing the unfiltered list of all values this key could possibly have

Protected variable

TSharedPtr< SKe...

 

KeyTreeView

Protected variable

TSharedPtr< SWi...

 

MenuContent

Reference to the menu content that's displayed when the key button is clicked on

Protected variable

FOnKeyChanged

 

OnKeyChanged

Delegate that is called every time the key changes.

Protected variable

FText

 

SearchText

Protected variable

TAttribute< FOp...

 

TreeViewHeight

Desired height of the tree view widget

Protected variable

TAttribute< FOp...

 

TreeViewWidth

Desired width of the tree view widget

Functions

Name Description

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Protected function Virtual

TSharedRef< ...

 

GenerateKeyTreeRow

(
    FKeyTreeItem InItem,
    const TSharedRef< STableViewBase > ...
)

Treeview support functions

Protected function

bool

 

GetChildrenMatchingSearch

(
    const TArray< FString >& SearchTok...,
    const TArray< FKeyTreeItem >& Unfi...,
    TArray< FKeyTreeItem >& OutFiltere...
)

Helper to generate the filtered list of keys, based on the search string matching

Protected function Const

const FSlate...

 

GetIconFromKey

(
    FKey Key
)

Determine the best icon to represent the given key.

Protected function

void

 

GetKeyChildren

(
    FKeyTreeItem InItem,
    TArray< FKeyTreeItem >& OutChildre...
)

Protected function Const

FText

 

GetKeyDescription()

Gets a succinct description for the key being manipulated

Protected function Const

FSlateColor

 

GetKeyIconColor()

Toggles the icon's color when in listen mode

Protected function Const

const FSlate...

 

GetKeyIconImage()

Gets the icon for the key being manipulated

Protected function Const

FText

 

GetKeyTooltip()

Gets a tooltip for the selected key

Protected function Virtual

TSharedRef< ...

 

GetMenuContent()

Gets the Menu Content, setting it up if necessary

Protected function Const

void

 

GetSearchTokens

(
    const FString& SearchString,
    TArray< FString >& OutTokens
)

Protected function

FReply

 

ListenForInput()

Start listening for the next key press

Protected function

void

 

OnFilterTextChanged

(
    const FText& NewText
)

Key searching support

Protected function

void

 

OnFilterTextCommitted

(
    const FText& NewText,
    ETextCommit::Type CommitInfo
)

Protected function

void

 

OnKeySelectionChanged

(
    FKeyTreeItem Selection,
    ESelectInfo::Type SelectInfo
)

Protected function

FReply

 

ProcessHeardInput

(
    FKey KeyHeard
)

Assigns the heard input as the current key

Overridden from SWidget

Name Description

Protected function Virtual

FReply

 

OnAnalogValueChanged

(
    const FGeometry& MyGeometry,
    const FAnalogInputEvent& InAnalogI...
)

Called when an analog value changes on a button that supports analog

Protected function Virtual

FReply

 

OnKeyDown

(
    const FGeometry& MyGeometry,
    const FKeyEvent& InKeyEvent
)

Input listeners

Protected 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.

Protected function Virtual

FReply

 

OnMouseMove

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

The system calls this method to notify the widget that a mouse moved within it.

Protected function Virtual

FReply

 

OnMouseWheel

(
    const FGeometry& MyGeometry,
    const FPointerEvent& MouseEvent
)

Called when the mouse wheel is spun. This event is bubbled.

Protected 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