Navigation
API > API/Runtime > API/Runtime/SlateCore
FKeyEvent describes a key action (keyboard/controller key/button pressed or released.) It is passed to event handlers dealing with key input.
| Name | FKeyEvent |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Input/Events.h |
| Include Path | #include "Input/Events.h" |
Syntax
USTRUCT (BlueprintType )
struct FKeyEvent : public FInputEvent
Inheritance Hierarchy
- FInputEvent → FKeyEvent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FKeyEvent () |
UStruct Constructor. Not meant for normal usage. | Input/Events.h | |
FKeyEvent
(
const FKey InKey, |
Constructor. Events are immutable once constructed. | Input/Events.h | |
FKeyEvent
(
const FKey InKey, |
Input/Events.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FKeyEvent() |
Input/Events.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CharacterCode | uint32 | The character code of the key that was pressed. Only applicable to typed character keys, 0 otherwise. | Input/Events.h | |
| Key | FKey | Name of the key that was pressed. | Input/Events.h | |
| KeyCode | uint32 | Original key code received from hardware before any conversion/mapping. | Input/Events.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint32 GetCharacter() |
Returns the character code for this event. | Input/Events.h | |
FKey GetKey() |
Returns the name of the key for this event | Input/Events.h | |
uint32 GetKeyCode() |
Returns the key code received from hardware before any conversion/mapping. | Input/Events.h |
Overridden from FInputEvent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsKeyEvent() |
Is this event a key event. | Input/Events.h | |
virtual FText ToText() |
Input/Events.h |