Skip to content

raylib.IsKeyPressedRepeat

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Check if a key has been pressed again

Parameters

Parameter Default Value Note
key

Return value

Condition Return Value
(always) number

Notes

Example

raylib.InitWindow 800, 600, "Key Repeat Demo"
count = 0
while not raylib.WindowShouldClose
    if raylib.IsKeyPressedRepeat(raylib.KEY_RIGHT) then count = count + 1
    raylib.BeginDrawing
    raylib.ClearBackground color.white
    raylib.DrawText "Right key (with repeat): " + count, 10, 10, 20, color.black
    raylib.EndDrawing
end while
raylib.CloseWindow

Clone this wiki locally