Skip to main content
Module

x/tui/src/key_reader.ts>readKeypresses

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
function readKeypresses
import { readKeypresses } from "https://deno.land/x/tui@1.3.4/src/key_reader.ts";

Read keypresses from given stdin (except for Windows) and then parse them. On Windows keys are read by calling _getch() in msvcrt.dll. It yields array of either KeyPress or MousePress

Returns

AsyncGenerator<(KeyPress | MousePress)[], void, void>