Skip to content

Send clipboard and emoji paste shortcuts through Hyprland so XWayland apps receive them - #18935

Open
bscott wants to merge 1 commit into
omacom:quattrofrom
bscott:fix/xwayland-paste-shortcut
Open

bscott wants to merge 1 commit into
omacom:quattrofrom
bscott:fix/xwayland-paste-shortcut

Conversation

@bscott

@bscott bscott commented Nov 14, 2026

Copy link
Copy Markdown

Part of #16536. Split out of #16537 so the plain fix can be reviewed apart from the Voxtype default change.

Clipboard history paste, file paste and the emoji picker send Shift+Insert through wtype. XWayland apps never load the keymap wtype uploads, so they read the chord as Shift+Escape and nothing is pasted. The issue has the reproduction and a delivery matrix, and a second report covers Foot, T3Code and Zen Browser on 4.5.0-3.

Hyprland can press the keys itself on the seat's own keymap, which XWayland apps receive as sent. Omarchy's universal copy and paste bindings already do this in default/hypr/bindings/clipboard.lua.

What changes

  • omarchy-hyprland-send-shortcut <mods> <key> (hidden) sends a chord to the focused surface through hl.dsp.send_key_state, with the same no-window-target and down/up split as clipboard.lua.
  • omarchy-clipboard-paste-text --shift-insert, omarchy-clipboard-paste-file and omarchy-menu-emoji-insert send their Shift+Insert through it instead of wtype -M shift -k Insert -m shift.

No defaults or user config change. The --universal path added in #17827 is untouched.

Testing

  • bash test/shell.d/clipboard-test.sh, emojis-test.sh and ./test/cli
  • Hyprland 0.56.2, wtype 0.4, with an Electron 43 textarea under --ozone-platform=x11 and --ozone-platform=wayland, and a GTK key logger under both GDK backends: Hyprland's Shift+Insert pasted intact in both, where wtype's Shift+Insert pasted nothing under XWayland.

…ive them

wtype types through a keymap XWayland clients never load, so its
Shift+Insert reaches them as Shift+Escape and nothing is pasted. The
clipboard history paste, file paste and emoji picker now send the chord
through Hyprland's send_key_state, as the universal clipboard bindings do.
@greptile-apps

greptile-apps Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Routes clipboard and emoji paste shortcuts through Hyprland instead of wtype, so XWayland apps receive Shift+Insert correctly.

  • Clipboard history, file, and emoji pastes now send Shift+Insert through Hyprland.

No actionable issues were found. This review checked source code; it did not run tests or a live desktop.

Reviews (1) · Last reviewed commit: "Send clipboard paste shortcuts through H..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reproduced at 87e21d205a03f8fb776efe9c6b04624c43f38b2d on a disposable Omarchy worker with Hyprland 0.57.2, GTK3 3.24.52 and wtype 0.4. Nothing was pushed.

  • In an XWayland GTK entry, the base text, file-content and emoji helpers pasted nothing and delivered Escape. This head pasted the expected text and emoji intact; restoring the base helpers brought the failure back. File-content delivery used a text/plain file.
  • The actual clipboard and emoji pickers also failed with the base helpers, worked with this head, and failed with the helpers reverted, in both native Wayland and XWayland GTK windows. Both picker flows passed under Dvorak and Russian layouts too.
  • ./test/cli passed, along with clipboard-test.sh (69 checks) and emojis-test.sh (12 checks) through the worker's compositor-aware runner. The shell tests initially stopped because Node was missing from the SSH PATH; adding the already-installed Node resolved that.

A direct helper call in a native GTK window can still fail after wtype changes its keymap, without a picker focus transition. The normal picker flows above worked in that sequence. WebKitGTK, Qt clients and image-MIME paste were not exercised.

GPT-6 High in Codex reviewed the source, callers and worker results. Opus 5.5 High and muse-wonder via pi, thinking high, reviewed the same head and evidence and found no source change needed. Their agreement is not guaranteed independent.

This waits on the maintainer to reconcile the shared paste calls with #15343, which already carries ready, and #15327. The older #12377 misses the emoji path and uses a physical V key position outside terminals, which is K on Dvorak. #16537 is stacked on this exact commit and keeps the separate Voxtype change. This covers only the clipboard/emoji part of #16536, so it should leave that issue open.

Before: the base helper leaves the XWayland GTK entry empty

After: this head pastes the expected text into the same XWayland GTK entry

@augustl

augustl commented Nov 18, 2026

Copy link
Copy Markdown

Tested the emoji picker on Omarchy 4.5.0-3, Hyprland 0.56.2, and Firefox 158.0.1 running natively on Wayland. Search + Enter inserted the emoji 0/3 times with the stock helper, 3/3 with the Hyprland key-down/key-up change from this PR, and 3/3 with the -p VoidSymbol change from #15327.

Firefox reported key="Insert", code="Escape" with both wtype variants, including the one that pasted successfully. The Hyprland variant reported key="Insert", code="Insert". So both proposed changes resolve the Firefox symptom in this setup, and Firefox can paste even when the reported code is Escape.

@omarchybot

Copy link
Copy Markdown
Collaborator

The Firefox comparison confirms that both changes fix that native Wayland emoji case. It does not compare XWayland delivery. The earlier worker run tested this head against the stock helpers, not the -p VoidSymbol alternatives under XWayland, so that run does not settle the comparison with #15327 and #15343.

GPT-6 in Codex (reasoning effort not exposed), Opus 5.5 High and muse-wonder via pi, thinking high, reviewed the new report and the unchanged head 87e21d205a03f8fb776efe9c6b04624c43f38b2d. No source change was needed; the reviewers agreed, with independence not guaranteed. Tests were not rerun in this review; the earlier worker results and their limits remain recorded above.

This still waits on the maintainer to reconcile the overlapping fixes. There is nothing further for the author to change from this review.

@augustl

augustl commented Nov 18, 2026

Copy link
Copy Markdown

I ran the XWayland comparison locally on Omarchy 4.5.0-3 and Hyprland 0.56.2. I invoked the paste helpers directly against Firefox 158.0.1 and a GTK3 entry. Across Firefox emoji paste and GTK3 emoji, plain-text, and text/plain file paste, the stock helper and the -p VoidSymbol variants from #15327 and #15343 each passed 0/3 per case. The Hyprland key-down/key-up variant passed 3/3 per case.

Both wtype variants arrived as Shift+Escape, which opened Firefox’s Process Manager. The Hyprland variant delivered Shift+Insert and pasted the expected content.

@omarchybot

Copy link
Copy Markdown
Collaborator

The new XWayland comparison addresses the gap in the previous review: augustl reports 0/3 with both stock and -p VoidSymbol helpers, and 3/3 with this change, for Firefox emoji paste and GTK3 emoji, text and text/plain file paste. Those were direct helper calls on their machine. The earlier worker run here compared stock against this head through both direct calls and the actual pickers; it did not test the VoidSymbol variants.

The source explains the difference: adding VoidSymbol gives wtype another keycode, but leaves Insert at the keycode XWayland reads as Escape. Sending through Hyprland uses the seat's keymap instead. This distinguishes the XWayland case from the native Wayland case where both approaches have been reported to work.

GPT-6 in Codex (reasoning effort not exposed), Opus 5.5 High and muse-wonder via pi, thinking high, reviewed the new report against unchanged head 87e21d205a03f8fb776efe9c6b04624c43f38b2d and the competing diffs. No source change was needed; the reviewers agreed, with independence not guaranteed. No worker or tests were run in this re-review, and the earlier verification retains its recorded limits.

This still waits on the maintainer to reconcile #15343 and #15327 on the shared paste calls. There is nothing further for the author to change from this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants