RealDocs

UKismetInputLibrary::Key_GetDisplayName

function Engine Blueprint Since unknown
#include "Kismet/KismetInputLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns the localized, human-readable display name of a key, suitable for showing key bindings in UI.

Caveats & Gotchas

  • The returned FText is localized to the current culture — do not compare it against a hardcoded string to identify the key, compare the FKey itself instead.
  • Short display names (bLongDisplayName=false) are not defined for every key; some keys fall back to the long name regardless.

Signature

static FText Key_GetDisplayName(const FKey& Key, bool bLongDisplayName = true);

Parameters

Name Type Description Default
Key const FKey& The key to get a display name for.
bLongDisplayName bool If true, returns the full name (e.g. "Left Shift"); if false, returns a short form where available (e.g. "LShift"). true

Return Type

FText

Example

Show a key binding in a settings menu C++
FText JumpKeyLabel = UKismetInputLibrary::Key_GetDisplayName(JumpKey);
JumpKeyText->SetText(JumpKeyLabel);

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.