Paste clipboard history with Ctrl+V outside terminals - #11300
Open
phedoreanu wants to merge 1 commit into
Open
Conversation
The clipboard manager pasted every entry with a synthetic Shift+Insert. Terminals and GTK apps accept that, Firefox does not: pressing Enter in the panel copied the entry and then pasted nothing into the page. Send the keystroke the focused window understands instead. Windows with the terminal tag still get Shift+Insert, since Ctrl+V is a control character there. Everything else gets Ctrl+V. This is the same rule the SUPER+V binding already applies. Both paste helpers share the new omarchy-clipboard-paste-keystroke command, and the paste-text flag is renamed from --shift-insert to --paste to match what it now does.
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.
Problem
Pressing Enter in the clipboard manager copies the entry and sends
Shift+Insertthroughwtype. Terminals and GTK apps paste on that, Firefox does not, so in Firefox the panel closes and nothing appears. Same for the image paste helper.Reproduced on 4.0.3 with a page whose textarea mirrors its content into the window title: synthetic
Shift+Insertleft it unchanged, syntheticCtrl+Vpasted. The sameShift+Insertpastes fine into foot.Fix
New hidden
omarchy-clipboard-paste-keystrokesends the chord the focused window understands, using the same terminal check as theSUPER+Vbinding indefault/hypr/bindings/clipboard.lua:terminalgetsShift+Insert, sinceCtrl+Vis a control character thereCtrl+Vomarchy-clipboard-paste-textandomarchy-clipboard-paste-fileboth call it. The--shift-insertflag on paste-text is renamed to--paste, since it no longer means Shift+Insert.Clipboard.qmlis the only caller and is updated.Testing
test/shell.d/clipboard-test.shstubshyprctl activewindow -jand covers terminal, browser and untagged windows for both helpers../test/shell: onlylocate-test.shandsnapper-test.shfail, both on the missingomarchy-isocheckout, unrelated.