Skip to main content
Module

x/cliffy/keypress/mod.ts>Keypress

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class Keypress
implements AsyncIterableIterator<KeyPressEvent>, PromiseLike<KeyPressEvent>
extends EventTarget
import { Keypress } from "https://deno.land/x/cliffy@v0.19.2/keypress/mod.ts";

Properties

readonly
disposed: boolean

Methods

addEventListener(
type: "keydown",
options?: boolean | AddEventListenerOptions,
): void
dispose(error?: Error)
next(): Promise<IteratorResult<KeyPressEvent>>
removeEventListener(
type: "keydown",
options?: EventListenerOptions | boolean,
): void
then<T, S>(f: (v: KeyPressEvent) => T | Promise<T>, g?: (v: Error) => S | Promise<S>): Promise<T | S>
[Symbol.asyncIterator](): AsyncIterableIterator<KeyPressEvent>