UKismetInputLibrary::ModifierKeysState_IsAltDown
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if either the left or right Alt 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 Alt; test the underlying FInputEvent with InputEvent_IsLeftAltDown or InputEvent_IsRightAltDown if you need that distinction.
Signature
static bool ModifierKeysState_IsAltDown(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
Show an alternate tooltip while Alt is held C++
void UMyWidget::CheckModifiers()
{
const FSlateModifierKeysState KeysState = UKismetInputLibrary::GetModifierKeysState();
if (UKismetInputLibrary::ModifierKeysState_IsAltDown(KeysState))
{
ShowAlternateTooltip();
}
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?