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