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

x/cliffy/keycode/mod.ts>KeyCode.parse

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
method KeyCode.parse
import { KeyCode } from "https://deno.land/x/cliffy@v0.18.0/keycode/mod.ts";

Parse ansi escape sequence.

Parameters

data: Uint8Array | string

Ansi escape sequence.

KeyCode.parse("\x04\x18");
[
KeyEvent { name: "d", sequence: "\x04", ctrl: true, meta: false, shift: false },
KeyEvent { name: "x", sequence: "\x18", ctrl: true, meta: false, shift: false },
]