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

bool

 

IsKeyEvent()

Is this event a key event.

Public function Virtual Const

FText

 

ToText()

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback