Skip to content

raylib.IsKeyUp

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check if a key is NOT being pressed (key not held down)

Parameters

Parameter Default Value Note
key

Return value

Condition Return Value
(always) number

Notes

Example

raylib.InitWindow 800, 600, "Key Up Demo"
while not raylib.WindowShouldClose
    raylib.BeginDrawing
    raylib.ClearBackground color.white
    if raylib.IsKeyUp(raylib.KEY_ESCAPE) then
        raylib.DrawText "ESC is up (not held)", 10, 10, 20, color.green
    else
        raylib.DrawText "ESC is being held!", 10, 10, 20, color.red
    end if
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally