Home > assistive-playwright-client > VMKeyboard > press
Shortcut for VMKeyboard.down() and VMKeyboard.up().
Signature:
press(key: string, options?: {
delay?: number | undefined;
}): Promise<void>;
| Parameter | Type | Description |
|---|---|---|
| key | string | Name of the key (cf Key) or its corresponding character, for example PageUp or a. Shortcuts such as "Control+a" or “Control+Shift+a” can also be specified, as documented in https://playwright.dev/docs/api/class-keyboard#keyboardpresskey-options |
| options | { delay?: number | undefined; } | delay: delay in milliseconds between keydown and keyup events |
Returns:
Promise<void>