Commit 72c4845
v1.21: image paste through menu via tmux send-keys C-v (bypass modal grab)
v1.20 fixed text paste from the menu by writing clipboard bytes into
the pane via 'tmux load-buffer + paste-buffer'. v1.21 does the same
thing structurally for images: the right-click menu Paste path now
delivers the Ctrl-V *byte* (\\026) to the pane's pty via 'tmux send-keys
-t <pane> C-v' instead of synthesizing the keystroke at OS level with
ydotool.
Why: ydotool key ctrl+v happens at the kernel input layer; tmux's
display-menu has a modal keyboard grab while open, so the menu eats
the synthesized keystroke before any host terminal (GNOME Terminal,
kitty, etc.) sees it. tmux send-keys writes the byte directly into the
target pane's pty *after* tmux's keytable layer — no menu interception,
no recursion against tmux's own bind -n C-v.
Inside the TUI (Claude Code, Codex, etc.) the \\026 byte still triggers
the same image-paste handler, which reads the clipboard via wl-paste
and gets the staged image via flashpaste's shim/xclip fallback chain.
Two call sites patched in bin/tmux-paste-dispatch.sh:
- Early FAST PATH non-kitty branch (~line 287)
- Late image-paste branch fallback (~line 577)
Kitty path unchanged — kitty @ send-text is already pty-direct and
works fine.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 61604a3 commit 72c4845
2 files changed
Lines changed: 63 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
680 | 680 | | |
681 | 681 | | |
682 | 682 | | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
303 | 308 | | |
304 | 309 | | |
305 | 310 | | |
| |||
569 | 574 | | |
570 | 575 | | |
571 | 576 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
585 | 590 | | |
586 | 591 | | |
587 | 592 | | |
| |||
0 commit comments