Skip to content

fix(desktop): preserve overlapping terminal input on macOS WebKit - #702

Merged
huichen merged 1 commit into
mainfrom
fix/terminal-fast-input
Sep 17, 2026
Merged

huichen merged 1 commit into
mainfrom
fix/terminal-fast-input

Conversation

@huichen

@huichen huichen commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Work around xterm 6.0 rejecting committed WebKit input when the previous key is still held (upstream Cannot type Shifted characters (e.g. #, ") or overlapping keys in Safari on macOS xtermjs/xterm.js#5374).
  • Install a narrowly scoped macOS WebKit beforeinput listener; keep xterm onData, keypress deduplication, IME composition, and other platforms unchanged. Remove the listener on unmount.
  • Add 19 real-xterm event-sequence regression tests, including the unpatched htop -> htp reproduction, overlapping keys, Shift/Caps Lock, composition, shortcuts, platform guards, and cleanup.
  • Document the private-API compatibility boundary and native manual verification steps.

Validation

  • Desktop tsc --noEmit: passed
  • Desktop eslint src/**/*.{ts,tsx}: passed
  • Desktop vitest run: 135 files / 1160 tests passed
  • Native macOS IME manual verification not performed; tests replay the upstream WebKit sequence through real xterm in jsdom.
  • No Rust/backend changes.

@huichen
huichen enabled auto-merge (squash) September 17, 2026 09:52
@huichen
huichen merged commit d1f63a3 into main Sep 17, 2026
12 checks passed
@huichen
huichen deleted the fix/terminal-fast-input branch September 17, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant