Repository navigation
Paste with Ctrl+Shift+V in terminals and Herdr - #72
Open
nchudleigh wants to merge 1 commit into
Open
nchudleigh wants to merge 1 commit into
nchudleigh wants to merge 1 commit into
Conversation
Shift+Insert pastes the primary selection in Alacritty, Kitty and Ghostty, and Herdr passes it to the pane's program as an Insert key. Read the focused window's class and send Ctrl+Shift+V to terminals (SPEC §5.3); other apps keep Shift+Insert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"Paste to Active App" did nothing in Herdr and pasted the wrong thing in most terminals.
Why: the paste script always sent Shift+Insert, the keystroke Omarchy's clipboard history uses. Herdr binds paste to Ctrl+Shift+V and passes Shift+Insert to the program in the pane as an Insert key. Alacritty, Kitty and Ghostty map Shift+Insert to the primary selection, not the clipboard. SPEC §5.3 already asks for Ctrl+Shift+V in terminals.
Change: after the launcher unmaps,
services/ClipboardWriter.qmlreads the focused window's class fromhyprctl activewindow -j. It sends Ctrl+Shift+V to herdr, alacritty, kitty, foot, wezterm, ghostty, konsole, gnome-terminal and ptyxis, and Shift+Insert to everything else. The script is still constant, so no user text reaches argv. This affects every paste that goes throughclipboard.paste, such as the calculator's Paste Answer.Tested: I ran the script with stand-in
wl-copy,hyprctlandwtype. herdr-app, Alacritty, Ghostty and Kitty got Ctrl+Shift+V; Slack and Chromium got Shift+Insert. The plugin reloaded with no QML errors. I haven't done a real paste into Herdr yet.Limit: a terminal not on that list still gets Shift+Insert.
🤖 Generated with Claude Code