feat(linux): Tk focus-free write via send IPC - #1813
Conversation
Tk has no AT-SPI bridge, so background writes use Tk's `send` IPC instead. The test app registers as "cua-tk-target" and the driver injects text by spawning `wish` to send Tcl commands. This is the Tk-specific override (like CDP for Chromium), proving non-accessible toolkits can support focus-free input with bespoke paths. - Add inject_tk_send() in platform-linux/input/mod.rs - Wire it into type_text tool after AT-SPI, before XSendEvent fallback - Update Tk test app to register with tk appname + name entry widget - Add tkSubtest that asserts the write lands and focus stays put - Include pkgs.tk so wish is available in the test environment Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Linux visual regression artifactsMatrix jobs now run independently. Download GIF artifacts from this workflow run:
|
2e57527
into
claude/lucid-lovelace-CMVuM
Summary
Implements focus-free background writes for Tk (tkinter Entry) via Tk's native
sendIPC mechanism.Problem
Solution
cua-tk-targetviatk appnamewishand sends Tcl commands:send cua-tk-target {.entry insert insert {text}}Key Insight
Toolkit-specific override (like CDP for Chromium). Proves non-accessible toolkits can support focus-free input with bespoke paths.
Files Changed
platform-linux/src/input/mod.rs(+53 lines -inject_tk_send)platform-linux/src/tools/impl_.rs(+7 lines - integration)nix/cua-driver/tests/linux-background-gui.nix(+37 lines -tksend=true, readback assertion)Testing
nix build .#checks.x86_64-linux.cua-driver-linux-background-gui-tk