Skip to content

keycode() erroneously interprets "Escape" then "[" as "left" #830

@cspotcode

Description

@cspotcode

Add await delay(1000) to examples/keycode.ts to simulate a source of lag in a TUI program.

Press "Escape" then "[" keys in under a second.

keycode() interprets this as a "left" keypress:

[ "\x1b", "[" ]
Key pressed: {
  name: "left",
  char: undefined,
  sequence: "\x1b[undefined",
  code: "[d",
  ctrl: false,
  meta: false,
  shift: true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions