UKismetInputLibrary::Key_IsGamepadKey
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns true if the key is a gamepad button, trigger, or stick axis.
Caveats & Gotchas
- • Covers all gamepad-family keys generically (buttons and axes) — use Key_IsAxis1D/2D alongside this if you need to distinguish a gamepad button press from a gamepad stick/trigger axis specifically.
- • The set of recognized gamepad keys depends on the platform's registered gamepad key definitions, so keys from a custom controller may not be recognized unless properly registered with the input system.
Signature
static bool Key_IsGamepadKey(const FKey& Key); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Key | const FKey& | The key to test. | — |
Return Type
bool Example
Detect gamepad input for UI prompts C++
if (UKismetInputLibrary::Key_IsGamepadKey(LastPressedKey))
{
ShowGamepadButtonPrompt(LastPressedKey);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?