Skip to content

raylib.IsKeyReleased

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check if a key has been released once

Parameters

Parameter Default Value Note
key

Return value

Condition Return Value
(always) number

Notes

Example

raylib.InitWindow 800, 600, "Key Released Demo"
msg = "Hold SPACE and release it"
while not raylib.WindowShouldClose
    if raylib.IsKeyReleased(raylib.KEY_SPACE) then msg = "Space released!"
    raylib.BeginDrawing
    raylib.ClearBackground color.white
    raylib.DrawText msg, 10, 10, 20, color.black
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally