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

x/tui/src/keyboard.ts

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
import * as tui from "https://deno.land/x/tui@1.3.4/src/keyboard.ts";

Functions

handleKeypresses() has to be called in order for this function to work. CTRL+Arrows moves focus in appropriate direction. CTRL+F keys switches between views, to get back to default press the same CTRL+F key again. Just Enter (Return) calls interact("keyboard") on focused component. It's up to component how it handles it.

Intercepts keypresses from readKeypress() and dispatch them as events to tui that way keyPress, multiKeyPress and mousePress events work