RealDocs

UKismetInputLibrary::Key_IsKeyboardKey

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

Description

Returns true if the key is a keyboard button.

Caveats & Gotchas

  • Returns false for mouse and gamepad keys as well as for keyboard-adjacent input like text input events — it strictly checks the FKey's registered key category.
  • Useful for filtering a generic 'any key' input binding down to keyboard-only handling before dispatching to keybinding or remapping UI.

Signature

static bool Key_IsKeyboardKey(const FKey& Key);

Parameters

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

Return Type

bool

Example

Detect keyboard input for control-scheme switching C++
if (UKismetInputLibrary::Key_IsKeyboardKey(LastPressedKey))
{
    SwitchToKeyboardAndMouseScheme();
}

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.