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

x/cliffy/keycode/key_code.ts>parse

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

Parse ansi escape sequence.

Parameters

data: Uint8Array | string

Ansi escape sequence.

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