RealDocs

UKismetInputLibrary::Key_IsButtonAxis

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

Description

Returns true if the key is a 1D axis that emulates a digital button press (i.e. it reports 0.0 or 1.0 rather than a continuous range).

Caveats & Gotchas

  • This is a subset of the keys that Key_IsAxis1D also returns true for — a button-emulating axis is still an axis type, just one that only ever reports the two extreme values.
  • Useful for distinguishing gamepad triggers configured as digital buttons from true analog triggers when building custom rebinding UI.

Signature

static bool Key_IsButtonAxis(const FKey& Key);

Parameters

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

Return Type

bool

Example

Separate true analog axes from button-style axes C++
if (UKismetInputLibrary::Key_IsAxis1D(BoundKey) && !UKismetInputLibrary::Key_IsButtonAxis(BoundKey))
{
    // Genuinely continuous analog input, not a digital-style axis
    BindTrueAnalogAxis(BoundKey);
}

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.