Skip to content

fix(cua-driver): preserve X11 keyboard delivery and timing - #3761

Merged
f-trycua merged 1 commit into
mainfrom
codex/land-x11-key-timing
Sep 12, 2026
Merged

fix(cua-driver): preserve X11 keyboard delivery and timing#3761
f-trycua merged 1 commit into
mainfrom
codex/land-x11-key-timing

Conversation

@f-trycua

@f-trycua f-trycua commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Land the Linux X11 keyboard timing and completion fix from #3709 on current main while preserving Peter Steinberger as the commit author and recording the original commit with cherry-pick -x.

X11 keyboard taps previously buffered key-down across the intended delay, allowing key-down and key-up to reach the server together. Background key and typing paths could also close their short-lived connection before final events were processed. This change flushes key-down before the existing delay and completes background delivery with a reply-bearing X11 request.

Related work

Fixes #3708.

Supersedes #3709 because its branch conflicts with the release-generated changelog on current main. Salvaged from #3709 with the original commit author and source commit preserved.

No RFC is required: this repairs the existing Linux input contract without changing a public SDK, CLI, MCP, protocol, permission, or cross-platform behavior contract.

Validation

Exact landing candidate: de6654fdc05467d2c85c46a941d281812bfe24df.

  • cargo fmt --all -- --check
  • git diff --check origin/main...HEAD
  • cargo test -p platform-linux --lib --locked (23 passed)
  • all ordinary pull request checks passed, including contributor attribution and release metadata
  • canonical Linux desktop E2E passed on the candidate: https://github.com/trycua/cua/actions/runs/34656140098
  • canonical Windows desktop E2E passed on the candidate: https://github.com/trycua/cua/actions/runs/34656141807
  • canonical macOS desktop E2E completed on the candidate: 160 passed, 3 failed; the three failures were confined to Electron accessibility/background text actions, with equivalent foreground/pixel and Tauri, WKWebView, AppKit, and TextEdit paths passing
  • the failing macos-electron-type-text-ax-background cell failed again on candidate retry, then failed identically on the pre-change base 141a6daa6e16cf8986e04f0f1c9a361d37175ce6 (delivered 0 of 17 character(s) via CGEvent), proving the macOS failure predates and is unrelated to this Linux-only diff

A short merged-main smoke and Cua Driver release-path verification will follow the merge.

Compatibility and risk

The production diff is confined to Linux X11 input. macOS, Windows, and native Wayland adapters are unchanged. The fix preserves existing modifier ordering, routing, focus, and timing values. It does not add a held-key API or claim that a 10 ms tap is sufficient for every state-polled game.

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.

Bug: Linux X11 key taps deliver press and release with zero hold interval

2 participants