UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FInputEvent Struct Reference

#include <Events.h>

+ Inheritance diagram for FInputEvent:

Public Member Functions

 FInputEvent ()
 
 FInputEvent (const FModifierKeysState &InModifierKeys, const int32 InUserIndex, const bool bInIsRepeat)
 
 FInputEvent (const FModifierKeysState &InModifierKeys, const FInputDeviceId InDeviceId, const bool bInIsRepeat)
 
virtual SLATECORE_API ~FInputEvent ()
 
bool IsRepeat () const
 
bool IsShiftDown () const
 
bool IsLeftShiftDown () const
 
bool IsRightShiftDown () const
 
bool IsControlDown () const
 
bool IsLeftControlDown () const
 
bool IsRightControlDown () const
 
bool IsAltDown () const
 
bool IsLeftAltDown () const
 
bool IsRightAltDown () const
 
bool IsCommandDown () const
 
bool IsLeftCommandDown () const
 
bool IsRightCommandDown () const
 
bool AreCapsLocked () const
 
const FModifierKeysStateGetModifierKeys () const
 
uint32 GetUserIndex () const
 
FInputDeviceId GetInputDeviceId () const
 
FPlatformUserId GetPlatformUserId () const
 
uint64 GetEventTimestamp () const
 
double GetMillisecondsSinceEvent () const
 
SLATECORE_API FGeometry FindGeometry (const TSharedRef< SWidget > &WidgetToFind) const
 
SLATECORE_API TSharedRef< SWindowGetWindow () const
 
void SetEventPath (const FWidgetPath &InEventPath)
 
const FWidgetPathGetEventPath () const
 
virtual SLATECORE_API FText ToText () const
 
virtual SLATECORE_API bool IsPointerEvent () const
 
virtual SLATECORE_API bool IsKeyEvent () const
 

Protected Attributes

FModifierKeysState ModifierKeys
 
bool bIsRepeat
 
uint32 UserIndex
 
FInputDeviceId InputDeviceId
 
const FWidgetPathEventPath
 
uint64 EventTimestamp
 

Detailed Description

Base class for all mouse and keyevents.

Constructor & Destructor Documentation

◆ FInputEvent() [1/3]

FInputEvent::FInputEvent ( )
inline

UStruct Constructor. Not meant for normal usage.

◆ FInputEvent() [2/3]

FInputEvent::FInputEvent ( const FModifierKeysState InModifierKeys,
const int32  InUserIndex,
const bool  bInIsRepeat 
)
inline

Constructor. Events are immutable once constructed.

Parameters
InModifierKeysModifier key state for this event
bInIsRepeatTrue if this key is an auto-repeated keystroke

◆ FInputEvent() [3/3]

FInputEvent::FInputEvent ( const FModifierKeysState InModifierKeys,
const FInputDeviceId  InDeviceId,
const bool  bInIsRepeat 
)
inline

◆ ~FInputEvent()

FInputEvent::~FInputEvent ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ AreCapsLocked()

bool FInputEvent::AreCapsLocked ( ) const
inline

Returns true if caps lock was on when this event occurred

◆ FindGeometry()

FGeometry FInputEvent::FindGeometry ( const TSharedRef< SWidget > &  WidgetToFind) const

The event path provides additional context for handling

◆ GetEventPath()

const FWidgetPath * FInputEvent::GetEventPath ( ) const
inline

◆ GetEventTimestamp()

uint64 FInputEvent::GetEventTimestamp ( ) const
inline
Returns
The CPU cycle timestamp of when this input event was created.

◆ GetInputDeviceId()

FInputDeviceId FInputEvent::GetInputDeviceId ( ) const
inline

Returns the input device that caused this event.

◆ GetMillisecondsSinceEvent()

double FInputEvent::GetMillisecondsSinceEvent ( ) const
inline
Returns
The amount of time in milliseconds which have passes since this input event was constructed

◆ GetModifierKeys()

const FModifierKeysState & FInputEvent::GetModifierKeys ( ) const
inline

Returns the complete set of modifier keys

◆ GetPlatformUserId()

FPlatformUserId FInputEvent::GetPlatformUserId ( ) const
inline

Returns the associated platform user that caused this event

◆ GetUserIndex()

uint32 FInputEvent::GetUserIndex ( ) const
inline

Returns the index of the user that generated this event.

◆ GetWindow()

TSharedRef< SWindow > FInputEvent::GetWindow ( ) const

◆ IsAltDown()

bool FInputEvent::IsAltDown ( ) const
inline

Returns true if either alt key was down when this event occurred

◆ IsCommandDown()

bool FInputEvent::IsCommandDown ( ) const
inline

Returns true if either command key was down when this event occurred

◆ IsControlDown()

bool FInputEvent::IsControlDown ( ) const
inline

Returns true if either control key was down when this event occurred

◆ IsKeyEvent()

bool FInputEvent::IsKeyEvent ( ) const
virtual

Is this event a key event.

Reimplemented in FKeyEvent.

◆ IsLeftAltDown()

bool FInputEvent::IsLeftAltDown ( ) const
inline

Returns true if left alt key was down when this event occurred

◆ IsLeftCommandDown()

bool FInputEvent::IsLeftCommandDown ( ) const
inline

Returns true if left command key was down when this event occurred

◆ IsLeftControlDown()

bool FInputEvent::IsLeftControlDown ( ) const
inline

Returns true if left control key was down when this event occurred

◆ IsLeftShiftDown()

bool FInputEvent::IsLeftShiftDown ( ) const
inline

Returns true if left shift key was down when this event occurred

◆ IsPointerEvent()

bool FInputEvent::IsPointerEvent ( ) const
virtual

Is this event a pointer event (touch or cursor).

Reimplemented in FPointerEvent.

◆ IsRepeat()

bool FInputEvent::IsRepeat ( ) const
inline

Returns whether or not this character is an auto-repeated keystroke

Returns
True if this character is a repeat

◆ IsRightAltDown()

bool FInputEvent::IsRightAltDown ( ) const
inline

Returns true if right alt key was down when this event occurred

◆ IsRightCommandDown()

bool FInputEvent::IsRightCommandDown ( ) const
inline

Returns true if right command key was down when this event occurred

◆ IsRightControlDown()

bool FInputEvent::IsRightControlDown ( ) const
inline

Returns true if right control key was down when this event occurred

◆ IsRightShiftDown()

bool FInputEvent::IsRightShiftDown ( ) const
inline

Returns true if right shift key was down when this event occurred

◆ IsShiftDown()

bool FInputEvent::IsShiftDown ( ) const
inline

Returns true if either shift key was down when this event occurred

Returns
True if shift is pressed

◆ SetEventPath()

void FInputEvent::SetEventPath ( const FWidgetPath InEventPath)
inline

Set the widget path along which this event will be routed

◆ ToText()

FText FInputEvent::ToText ( ) const
virtual

Member Data Documentation

◆ bIsRepeat

bool FInputEvent::bIsRepeat
protected

◆ EventPath

const FWidgetPath* FInputEvent::EventPath
protected

◆ EventTimestamp

uint64 FInputEvent::EventTimestamp
protected

◆ InputDeviceId

FInputDeviceId FInputEvent::InputDeviceId
protected

◆ ModifierKeys

FModifierKeysState FInputEvent::ModifierKeys
protected

◆ UserIndex

uint32 FInputEvent::UserIndex
protected

The documentation for this struct was generated from the following files: