RealDocs

UKismetInputLibrary::Key_IsModifierKey

function Engine Blueprint Since unknown
#include "Kismet/KismetInputLibrary.h"
Access: public Specifiers: staticBlueprintPure

Description

Returns true if the key is a modifier key: Ctrl, Command, Alt, or Shift.

Caveats & Gotchas

  • Only recognizes the four generic modifier keys — it does not distinguish left/right variants (e.g. LeftShift and RightShift both return true) and returns false for any other key, including gamepad triggers used as modifiers in custom input setups.
  • Distinct from InputEvent_IsShiftDown/IsControlDown/etc., which check whether a modifier was held during a specific input event — this instead asks whether a given FKey itself is one of the four modifier keys.

Signature

static bool Key_IsModifierKey(const FKey& Key);

Parameters

Name Type Description Default
Key const FKey& The key to test.

Return Type

bool

Example

Skip modifier keys in a key-rebinding UI C++
if (!UKismetInputLibrary::Key_IsModifierKey(PressedKey))
{
    // Only treat non-modifier keys as the primary binding
    BindKey(PressedKey);
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.