Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/tui/src/input_reader/decoders/keyboard.ts>decodeKey

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
function decodeKey
import { decodeKey } from "https://deno.land/x/tui@2.0.0/src/input_reader/decoders/keyboard.ts";

Decode {buffer} and/or {code} to {KeyPressEvent} object

Don't hold onto event object reference that gets returned!

It gets reused to save CPU usage and minimize GC.

Parameters

buffer: Uint8Array
code: string