Skip to content

fix(linux): adapt paste chord to focused app - #56

Merged
filipeforattini merged 1 commit into
mainfrom
fix/focused-window-paste
Sep 21, 2026
Merged

filipeforattini merged 1 commit into
mainfrom
fix/focused-window-paste

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • select Ctrl+Shift+V automatically for a detected terminal when zellij direct delivery is unavailable
  • retain Ctrl+V for graphical apps and the configured fallback when focus is unknown
  • emit modifiers and V in separate evdev frames to prevent Mutter/Wayland from producing a literal v
  • show the selected fallback chord in dit doctor and document the auto behavior

Root cause

Auto delivery only changed behavior for a reachable zellij target. Every other route used one global paste chord, so Alacritty without a selected zellij session received Ctrl+V by default. The chord was also emitted with modifier-down and V-down in one SYN_REPORT, allowing a compositor race.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test --release --no-fail-fast (92 passed, 1 ignored zellij e2e)

Fixes #43


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Known terminals now fall back to Ctrl+Shift+V automatically when direct zellij delivery is unavailable, while graphical apps retain Ctrl+V. Emit modifiers and V in separate evdev frames so Wayland cannot race the shortcut into a literal v. Fixes #43.
@filipeforattini filipeforattini added the ready-for-human Needs human decision/resolution before it can proceed or be delegated label Sep 19, 2026
@filipeforattini
filipeforattini merged commit 2945db8 into main Sep 21, 2026
2 checks passed
@filipeforattini
filipeforattini deleted the fix/focused-window-paste branch September 21, 2026 03:27
This was referenced Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Needs human decision/resolution before it can proceed or be delegated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux: Ctrl+V paste chord intermittently registers as a literal "v" (modifier+key emitted in one SYN_REPORT)

1 participant