import { KeyCode } from "https://dotland.deno.dev/x/cliffy@v0.12.0/packages/keycode/mod.ts";
Static Methods
protected
parseEscapeSequence(data: Uint8Array | string): KeyEvent[]Some patterns seen in terminal key escape codes, derived from combos seen at http://www.midnight-commander.org/browser/lib/tty/key.c
ESC letter ESC [ letter ESC [ modifier letter ESC [ 1 ; modifier letter ESC [ num char ESC [ num ; modifier char ESC O letter ESC O modifier letter ESC O 1 ; modifier letter ESC N letter ESC [ [ num ; modifier char ESC [ [ 1 ; modifier letter ESC ESC [ num char ESC ESC O letter
- char is usually ~ but $ and ^ also happen with rxvt
- modifier is 1 + (shift * 1) + (left_alt * 2) + (ctrl * 4) + (right_alt * 8)
- two leading ESCs apparently mean the same as one leading ESC