Skip to content

Paste clipboard files with Ctrl+V instead of Shift+Insert (#10526) - #10536

Open
baseman70 wants to merge 1 commit into
omacom:quattrofrom
baseman70:fix/clipboard-paste-image
Open

Paste clipboard files with Ctrl+V instead of Shift+Insert (#10526)#10536
baseman70 wants to merge 1 commit into
omacom:quattrofrom
baseman70:fix/clipboard-paste-image

Conversation

@baseman70

@baseman70 baseman70 commented Sep 6, 2026

Copy link
Copy Markdown

Problem

When selecting an image entry from the clipboard manager (Super + Ctrl + V), bin/omarchy-clipboard-paste-file copies the image to the clipboard via wl-copy --type "$mime" and then dispatches:

wtype -M shift -k Insert -m shift 2>/dev/null || true

As reported in #10526, terminal emulators (foot, ghostty, kitty, etc.) bind Shift+Insert to their own text-only paste handler and consume the keystroke before the running application ever sees it. Because the clipboard only holds an image/* flavor without a text flavor, the terminal emulator quietly drops the event, resulting in no paste and no feedback.

Consequently, terminal-based applications that support image paste (such as Claude Code, Gemini CLI, and terminal image viewers) fail to receive the pasted image, forcing users to manually press Ctrl+V.

Solution

Switch the synthetic paste keystroke in bin/omarchy-clipboard-paste-file from Shift+Insert to Ctrl+V:

wtype -M ctrl -k v -m ctrl 2>/dev/null || true
  • In terminal emulators, Ctrl+V passes through to running applications, allowing image-capable TUIs and CLI agents to read the image from the clipboard.
  • In graphical applications (browsers, chat clients, image editors), Ctrl+V continues to work as the universal paste shortcut.

Test plan

  • Run automated test suite: bash test/shell.d/clipboard-test.sh (all 76 assertions pass, covering --copy-only content staging, normal execution with ctrl v keystroke dispatch, missing argument fail-closed, and unreadable/nonexistent file fail-closed).
  • Run full CLI verification: ./test/cli (all 108 tests pass).

Closes #10526

Terminal emulators bind Shift+Insert as an internal text-only paste mechanism.
When an image is staged on the clipboard (image/png), the terminal consumes
Shift+Insert, finds no text flavor on the clipboard, and silently discards it.
Consequently, terminal applications supporting image paste (e.g. Claude Code,
Gemini CLI) never receive the pasted image.

Sending Ctrl+V allows terminal emulators to pass the keystroke through to
image-capable terminal applications, while continuing to work universally
across graphical applications.

Closes omacom#10526
@baseman70
baseman70 force-pushed the fix/clipboard-paste-image branch from 93555ca to ee82ab7 Compare September 6, 2026 20:03
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.

Clipboard manager cannot paste images into terminal apps: Shift+Insert is consumed as a text-only paste

1 participant