Function

onKeyRelease

(k: Key | Key[], action: (k: Key) => void): KEventController

Register an event that runs when user release certain keys.

param k- = The key(s) to listen for. See

param action- The function that runs when a user releases certain keys

// release `a` or `b` keys
onKeyRelease([`a`, `b`], (k) => {
    debug.log(`Released the ${k} key...`);
});

returns The event controller.

since v2000.1

group Input

subgroup Keyboard

Function

onKeyRelease

(action: (k: Key) => void): KEventController

Register an event that runs when user releases a key.

param action- The function that runs when a user releases a

// release a key
onKeyRelease((k) => {
    debug.log(`Released the ${k} key...`);
});

returns The event controller.

since v2000.1

group Input

kaplay logo

Components