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

If certain keys are currently down.
// equivalent to the calling bean.move() in an onKeyDown("left")
onUpdate(() => {
    if (isKeyDown("left")) {
        bean.move(-SPEED, 0)
    }
})

since

kaplay logo

Misc