keyboard

Interact with the keyboard device

Is Key Down?

keyboard.isKeyDown(Keys: key);

Example:

if (keyboard.isKeyDown(keys.Space)) 
{
    client.print("space bar is pressed");
}

Is Key Up?

keyboard.isKeyUp(Keys: key)

Press Key

keyboard.pressKey(Keys: key);

Press Key With Modifier

keyboard.pressKeyWithModifier(Keys: modifer, Keys: key)

Example:

keyboard.pressKeyWithModifier(keys.CTRl, keys.C)

Hold Key

keyboard.holdKey(Keys: key, int: time);

Type

keyboard.type(char: text);

Last updated

Was this helpful?