API reference
Preparing search index…

ImGui.IsKeyDown

  • Test whether a key is held down.

    Parameters

    key
    number

    ImGuiKey logical key identifier, not a platform-native key code.

    Returns

    boolean

    True if the key is currently held down; false otherwise.

    • the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey.A, ImGuiKey.MouseLeft, ImGuiKey.GamepadDpadUp...).

    • (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)

    • (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices)

    is key being held.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0