UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FModifierKeysState Class Reference

#include <GenericApplication.h>

Public Member Functions

 FModifierKeysState (const bool bInIsLeftShiftDown, const bool bInIsRightShiftDown, const bool bInIsLeftControlDown, const bool bInIsRightControlDown, const bool bInIsLeftAltDown, const bool bInIsRightAltDown, const bool bInIsLeftCommandDown, const bool bInIsRightCommandDown, const bool bInAreCapsLocked)
 
 FModifierKeysState ()
 
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
 
bool AreModifersDown (EModifierKey::Type ModiferKeys) const
 
bool AnyModifiersDown () const
 

Detailed Description

FModifierKeysState stores the pressed state of keys that are commonly used as modifiers

Constructor & Destructor Documentation

◆ FModifierKeysState() [1/2]

FModifierKeysState::FModifierKeysState ( const bool  bInIsLeftShiftDown,
const bool  bInIsRightShiftDown,
const bool  bInIsLeftControlDown,
const bool  bInIsRightControlDown,
const bool  bInIsLeftAltDown,
const bool  bInIsRightAltDown,
const bool  bInIsLeftCommandDown,
const bool  bInIsRightCommandDown,
const bool  bInAreCapsLocked 
)
inline

Constructor. Events are immutable once constructed.

Parameters
bInIsLeftShiftDownTrue if left shift is pressed
bInIsRightShiftDownTrue if right shift is pressed
bInIsLeftControlDownTrue if left control is pressed
bInIsRightControlDownTrue if right control is pressed
bInIsLeftAltDownTrue if left alt is pressed
bInIsRightAltDownTrue if right alt is pressed

◆ FModifierKeysState() [2/2]

FModifierKeysState::FModifierKeysState ( )
inline

Member Function Documentation

◆ AnyModifiersDown()

bool FModifierKeysState::AnyModifiersDown ( ) const
inline
Returns
true if any modifier key is down

◆ AreCapsLocked()

bool FModifierKeysState::AreCapsLocked ( ) const
inline
Returns
true if the Caps Lock key has been toggled to the enabled state.

◆ AreModifersDown()

bool FModifierKeysState::AreModifersDown ( EModifierKey::Type  ModiferKeys) const
inline
Parameters
ModifierKeysthe modifier keys to test to see if they are pressed. Returns true if no modifiers are specified.
Returns
true if all modifier keys are pressed specified in the modifier keys.

◆ IsAltDown()

bool FModifierKeysState::IsAltDown ( ) const
inline

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

Returns
True if alt is pressed

◆ IsCommandDown()

bool FModifierKeysState::IsCommandDown ( ) const
inline

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

Returns
True if command is pressed

◆ IsControlDown()

bool FModifierKeysState::IsControlDown ( ) const
inline

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

Returns
True if control is pressed

◆ IsLeftAltDown()

bool FModifierKeysState::IsLeftAltDown ( ) const
inline

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

Returns
True if left alt is pressed

◆ IsLeftCommandDown()

bool FModifierKeysState::IsLeftCommandDown ( ) const
inline

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

Returns
True if left command is pressed

◆ IsLeftControlDown()

bool FModifierKeysState::IsLeftControlDown ( ) const
inline

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

Returns
True if left control is pressed

◆ IsLeftShiftDown()

bool FModifierKeysState::IsLeftShiftDown ( ) const
inline

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

Returns
True if left shift is pressed

◆ IsRightAltDown()

bool FModifierKeysState::IsRightAltDown ( ) const
inline

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

Returns
True if right alt is pressed

◆ IsRightCommandDown()

bool FModifierKeysState::IsRightCommandDown ( ) const
inline

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

Returns
True if right command is pressed

◆ IsRightControlDown()

bool FModifierKeysState::IsRightControlDown ( ) const
inline

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

Returns
True if right control is pressed

◆ IsRightShiftDown()

bool FModifierKeysState::IsRightShiftDown ( ) const
inline

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

Returns
True if right shift is pressed

◆ IsShiftDown()

bool FModifierKeysState::IsShiftDown ( ) const
inline

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

Returns
True if shift is pressed

The documentation for this class was generated from the following file: