Skip to content

raylib.GetKeyPressed

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Get the last key pressed

Parameters

None.

Return value

Condition Return Value
(always) number

Notes

Example

// Drain the key press queue each frame
key = raylib.GetKeyPressed
while key != 0
    print "Key pressed: " + key
    key = raylib.GetKeyPressed
end while

Clone this wiki locally