UKismetInputLibrary::InputEvent_IsControlDown
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if either the left or right Control key was held down when this input event occurred.
Caveats & Gotchas
- • Reflects modifier state at the moment the event fired, not a live poll of current key state.
- • On macOS this checks the physical Control key, not Command — use InputEvent_IsCommandDown for the Mac equivalent of a typical Ctrl shortcut.
Signature
static bool InputEvent_IsControlDown(const FInputEvent& Input); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Input | const FInputEvent& | The input event to test. | — |
Return Type
bool Example
Detect a Ctrl+click style modifier C++
FReply UMyWidget::NativeOnMouseButtonDown(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent)
{
if (UKismetInputLibrary::InputEvent_IsControlDown(InMouseEvent))
{
AddToMultiSelection();
}
return FReply::Handled();
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?