Skip to content

Modified F1-F4, Alt+] and Alt+Shift+P typed before a terminal takes input are still dropped without a notice #2708

Closed

Description

@devswha

Follow-up to #2689.

Before a terminal takes input (input-ready), a key the held draft cannot hold is now told as "Not sent". A few real keys still produce the same bytes as a report xterm sends by itself, so the filter in retainTyped (src/lib/useTerminalMount.ts) treats them as xterm's and drops them without a notice:

  • Shift+F3 sends ESC [1;2R and Ctrl+F3 sends ESC [1;5R. Both look like a cursor-position report.
  • Alt+] sends ESC ], which looks like the start of an OSC color report.
  • Alt+Shift+P sends ESC P, which looks like the start of a DECRQSS reply.

Repro. Run scripts/terminal-early-keys-demo-regression.ts with input-ready held back, then press Shift+F3. No input frame is sent, nothing goes to the draft, and no notice appears. This was reproduced by the review of #2689.

Not a regression. Main drops every such key silently. #2689 makes most of them visible and leaves these few as they were.

Possible fix. Decide by whether the user or xterm produced the input, not by the bytes. One way is a flag set from the terminal's keydown/keypress listeners (like the existing typedChord and commandBackspace hooks). Add a Shift+F3 or Alt+] case to the regression script.

Activity

  1. added a commit that references this issue on Nov 4, 2026
    c91334b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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