Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/src/Input.ts>Keyboard#press

Headless Chrome Deno API
Latest
method Keyboard.prototype.press
import { Keyboard } from "https://deno.land/x/pptr@1.2.0/src/Input.ts";

Shortcut for Keyboard.down and Keyboard.up.

Parameters

  • Name of key to press, such as ArrowLeft. See KeyInput for a list of all key names.
optional
options: { delay?: number; text?: string; } = [UNSUPPORTED]
  • An object of options. Accepts text which, if specified, generates an input event with this text. Accepts delay which, if specified, is the time to wait between keydown and keyup in milliseconds. Defaults to 0.

Returns

Promise<void>