FKeyEvent

[FKeyEvent](API\Runtime\SlateCore\Input\FKeyEvent) describes a key action (keyboard/controller key/button pressed or released.) It is passed to event handlers dealing with key input.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Input/Events.h

Include

#include "Input/Events.h"

Syntax

struct FKeyEvent : public FInputEvent

Remarks

FKeyEvent describes a key action (keyboard/controller key/button pressed or released.) It is passed to event handlers dealing with key input.

Constructors

Name Description

Public function

FKeyEvent()

UStruct Constructor. Not meant for normal usage.

Public function

FKeyEvent

(
    const FKey InKey,
    const FModifierKeysState& InModifi...,
    const uint32 InUserIndex,
    const bool bInIsRepeat,
    const uint32 InCharacterCode,
    const uint32 InKeyCode
)

  1. Events are immutable once constructed.

Functions

Name Description

Public function Const

uint32

 

GetCharacter()

Returns the character code for this event.

Public function Const

FKey

 

GetKey()

Returns the name of the key for this event

Public function Const

uint32

 

GetKeyCode()

Returns the key code received from hardware before any conversion/mapping.

Overridden from FInputEvent

Name Description

Public function Virtual Const

FText

 

ToText()

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