Function
isKeyPressed
(k?: Key | Key[]): booleanIf any or certain key(s) are just pressed last frame.
param k- The key(s) to check.
onUpdate(() => {
if (!isKeyPressed()) return // early return as no key was pressed
if (isKeyPressed("space")) debug.log("Pressed the jump key")
if (isKeyPressed(["left", "right"])) debug.log("Pressed any of the move keys")
})since v2000.0
group Input
subgroup Keyboard