alt.isKeyToggled

Used to check if a JavaScript key code is currently toggled.

Use a website like keycode.info to determine different key values.

If the key is toggled on it would be true.

Returns a boolean. (true / false)

Declaration

alt.isKeyToggled(key: number): boolean

Usage

alt.isKeyToggled(20); // Caps Lock

Real World Example

const result = alt.isKeyToggled(20); // Caps Lock

if (result) {
    console.log(`Caps Lock is Enabled!`);
} else {
    console.log(`Caps Lock is Not Enabled`);
}

These examples assume you have imported alt from alt-client.

results matching ""

    No results matching ""