Skip to content

Paste emojis into GTK3 and WebKitGTK apps - #15327

Open
stevederico wants to merge 1 commit into
omacom:quattrofrom
stevederico:fix/emoji-insert-gtk-keymap
Open

stevederico wants to merge 1 commit into
omacom:quattrofrom
stevederico:fix/emoji-insert-gtk-keymap

Conversation

@stevederico

Copy link
Copy Markdown
Contributor

The emoji picker pastes with one wtype chord, so wtype uploads a keymap holding only Insert. GTK3 skips the highest keycode when matching key bindings, and WebKitGTK maps editing keys through the same bindings, so Shift+Insert never pastes there (Tauri apps such as GitHub Copilot Desktop). Chromium and Electron match shortcuts themselves and were unaffected.

Fixes #12205

Changes

  • bin/omarchy-menu-emoji-insert: also release VoidSymbol in the same wtype call. That gives the keymap a second, higher key. It is never pressed, so the compositor drops the release and no extra key event reaches the app. The clipboard stays non-persistent.
  • test/shell.d/emojis-test.sh: checks Insert is not the highest keycode wtype uploads

Tests

Run on an Omarchy box:

  • test/shell.d/emojis-test.sh: pass (11 ok)
  • Live-verified on an Omarchy box: emoji inserted in a GTK3 app 3/3 and a WebKitGTK app 3/3

Not changed here

Clipboard-manager paste uses the same single-key chord and has the same issue in GTK3 and WebKitGTK apps. Left for a follow-up so this stays one change.

The emoji helper pastes with a single wtype chord, so wtype uploads a
keymap holding only Insert. GTK3 skips the highest keycode when it
matches key bindings, and WebKitGTK maps editing keys through the same
bindings, so Shift+Insert never pastes there (Tauri apps such as
GitHub Copilot Desktop). Chromium and Electron match shortcuts
themselves and were unaffected.

Releasing VoidSymbol in the same call gives the keymap a second, higher
key. It is never pressed, so the compositor drops the release and no
extra key event reaches the app. The clipboard stays non-persistent.

Fixes omacom#12205
@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no actionable defects were found.

Summary

Adds -p VoidSymbol to the emoji picker’s paste command so Insert is below the highest keycode.

  • Emoji choices now paste in GTK3 and WebKitGTK apps.

Reviews (1) · Last reviewed commit: "Paste emojis into GTK3 and WebKitGTK app..." · 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 Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for this. I tested it on a worker built from the Omarchy ISO (Hyprland 0.56.2, wtype 0.4-2), running quattro's helper and then yours at 966e4cd against the same probe windows:

  • GTK3 entry and WebKitGTK 4.1 page: with quattro's helper, nothing was pasted. With yours, the emoji was pasted 4 times out of 4 in each. Both logged only the Insert press and release, with no VoidSymbol event, so the extra release really does stay out of the app.
  • Firefox 157: quattro's helper sent Insert and no paste event, 0 out of 2. Yours fired a paste event every time, and the emoji landed 2 times out of 3. The miss looks like the helper's existing 0.2s clipboard window, not this change.
  • Chromium, foot and LibreOffice Writer: unchanged. Each got the emoji on both, and foot received exactly its four bytes and nothing more.
  • ./test/cli and test/shell.d/emojis-test.sh (11 passed) are green on the worker, and your new keymap test fails with quattro's helper put back.

Codex Medium reviewed it as a second opinion and found no defects. It checked wtype's source to confirm that -p VoidSymbol takes a second, higher keycode, and that modifiers take none. It agreed the change is proportionate to the problem. Its independence is not guaranteed.

Two older open pull requests change the same line: #6892 (Ctrl+V outside terminals, Ctrl+Shift+V in them) and #8573. On the same worker, neither pasted into the GTK3 or WebKitGTK probe, because each still uploads a keymap holding only v (-P v -p v reuses one keycode). Since this one also makes Firefox paste, it covers what #6892 was opened for and the case neither of the others reaches. Codex, asked which of the three should go forward without being told my answer, chose this one for the same reason. #6892 is already marked ready, so picking between them is the maintainer's call. The three can't all land as written.

Nothing is left for you to do. This is waiting on the maintainer.

stevederico added a commit to stevederico/omarchy that referenced this pull request Oct 31, 2026
The clipboard manager pastes text and file entries with a single wtype
chord, so wtype uploads a keymap holding only Insert. GTK3 skips the
highest keycode when it matches key bindings, and WebKitGTK maps editing
keys through the same bindings, so Shift+Insert never pastes there.
Chromium and Electron match shortcuts themselves and were unaffected.

Releasing VoidSymbol in the same call gives the keymap a second, higher
key. It is never pressed, so the compositor drops the release and no
extra key event reaches the app. This is the same fix as omacom#15327 for the
emoji picker.
stevederico added a commit to stevederico/omarchy that referenced this pull request Nov 10, 2026
The clipboard manager pastes text and file entries with a single wtype
chord, so wtype uploads a keymap holding only Insert. GTK3 skips the
highest keycode when it matches key bindings, and WebKitGTK maps editing
keys through the same bindings, so Shift+Insert never pastes there.
Chromium and Electron match shortcuts themselves and were unaffected.

Releasing VoidSymbol in the same call gives the keymap a second, higher
key. It is never pressed, so the compositor drops the release and no
extra key event reaches the app. This is the same fix as omacom#15327 for the
emoji picker.
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.

Emoji picker fails to insert/paste into Electron apps (e.g. GitHub Copilot Desktop)

2 participants