RealDocs

UKismetInputLibrary::ModifierKeysState_IsControlDown

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

Description

Returns true if either the left or right Control key was held down when the modifier-key state snapshot was captured.

Caveats & Gotchas

  • Operates on a captured FSlateModifierKeysState snapshot, not a live poll — call GetModifierKeysState first to obtain a current snapshot.
  • Does not distinguish between left and right Control; test the underlying FInputEvent with InputEvent_IsLeftControlDown or InputEvent_IsRightControlDown if you need that distinction.

Signature

static bool ModifierKeysState_IsControlDown(const FSlateModifierKeysState& KeysState);

Parameters

Name Type Description Default
KeysState const FSlateModifierKeysState& The modifier-key state snapshot to test, typically obtained from GetModifierKeysState.

Return Type

bool

Example

Check for Ctrl held during a widget tick C++
void UMyWidget::CheckModifiers()
{
    const FSlateModifierKeysState KeysState = UKismetInputLibrary::GetModifierKeysState();
    if (UKismetInputLibrary::ModifierKeysState_IsControlDown(KeysState))
    {
        EnableMultiSelectMode();
    }
}

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.