UKismetInputLibrary::ModifierKeysState_IsShiftDown
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if either Shift key was held down at the moment the given modifier-keys snapshot was captured.
Caveats & Gotchas
- • Requires an FSlateModifierKeysState snapshot obtained from UKismetInputLibrary::GetModifierKeysState() — it does not read live input on its own, so the snapshot can be stale if captured earlier in the same frame.
- • Unlike InputEvent_IsShiftDown, this is not tied to a specific input event; it is useful when you need the current modifier state outside of an input event callback, such as during a Tick.
Signature
static bool ModifierKeysState_IsShiftDown(const FSlateModifierKeysState& KeysState); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| KeysState | const FSlateModifierKeysState& | A modifier-keys snapshot obtained from GetModifierKeysState. | — |
Return Type
bool Example
Check Shift state outside an input event C++
FSlateModifierKeysState KeysState = UKismetInputLibrary::GetModifierKeysState();
if (UKismetInputLibrary::ModifierKeysState_IsShiftDown(KeysState))
{
ApplyFastCameraSpeed();
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?