class Keypress
extends EventTarget
import { Keypress } from "https://deno.land/x/cliffy@v0.23.2/keypress/mod.ts";
Methods
addEventListener(): void
type: "keydown",
listener: KeyPressEventListenerOrEventListenerObject | null,
options?: boolean | AddEventListenerOptions,
dispose(error?: Error)
next(): Promise<IteratorResult<KeyPressEvent>>
removeEventListener(): void
type: "keydown",
callback: KeyPressEventListenerOrEventListenerObject | null,
options?: EventListenerOptions | boolean,
then<T, S>(f: (v: KeyPressEvent) => T | Promise<T>, g?: (v: Error) => S | Promise<S>): Promise<T | S>
[Symbol.asyncIterator](): AsyncIterableIterator<KeyPressEvent>