Check if a key is being pressed (key held down)
raylib.InitWindow 800, 600, "Key Down Demo" x = 400 while not raylib.WindowShouldClose if raylib.IsKeyDown(raylib.KEY_RIGHT) then x = x + 4 if raylib.IsKeyDown(raylib.KEY_LEFT) then x = x - 4 raylib.BeginDrawing raylib.ClearBackground color.white raylib.DrawCircle x, 300, 20, color.blue raylib.EndDrawing end while raylib.CloseWindow
There was an error while loading. Please reload this page.