isKeyReleased(k?: Key | Key[]): boolean

If any or certain key(s) are just released last frame.

paramk- The key(s) to check.

onUpdate(() => {
    if (!isKeyReleased()) return // early return as no key was released

    if (isKeyReleased("space")) debug.log("Released the jump key")
    if (isKeyReleased(["left", "right"])) debug.log("Released any of the move keys")
})

sincev2000.0

kaplay logo

Misc

Layer