omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Super+V / Super+C don't paste or copy in shell overlays when a terminal is behind them

Open xsi-dbachmann opened this issue 3 weeks ago • 3 comments

System details

Dell XPS 14 (DA14260), Intel Core Ultra X7 358H, Arc B390, Omarchy 4.0.0.r7811.g3b53276, Hyprland 0.57.2

What's wrong?

Super+V and Super+C don't paste or copy in a shell overlay when a terminal window is behind it.

default/hypr/bindings/clipboard.lua picks the chord from the active window's terminal tag. The comment there says the keys also reach focused layer-shell surfaces, and they do. But the active window stays the one behind the overlay. So with foot behind it, the overlay gets Ctrl+Shift+V or Ctrl+Shift+C. Qt doesn't treat those as paste or copy, so nothing happens. Over Chrome the same overlay gets Ctrl+V and pastes fine.

Steps:

  1. Focus a foot window.
  2. Copy some text, open the menu with Super+Space.
  3. Press Super+V.

Expected: the text lands in the search field. Actual: nothing. Sending plain Ctrl+V to the same open menu pastes.

Same with third-party overlays, e.g. the JotDown plugin (arpitjalan.jotdown). Super+X already works everywhere, since it always sends Ctrl+X.

Workaround I'm running

The stock overlays (Ui/OverlayWindow.qml) take exclusive keyboard focus, and Hyprland's Lua API exposes that on hl.get_layers(). So while a mapped layer has exclusive focus, I send plain Ctrl+V / Ctrl+C, otherwise stock behaviour:

local function exclusive_layer_focused()
  for _, layer in ipairs(hl.get_layers()) do
    if layer.mapped and layer.keyboard_interactivity == 1 then
      return true
    end
  end
  return false
end

and in universal_clipboard_shortcut, check that before active_window_is_terminal().

On-demand layers (keyboard_interactivity == 2) aren't covered, since a mapped on-demand layer isn't necessarily focused and I found no way in Lua to tell. None of the stock overlays use on-demand, so this only matters for plugins.

Also noticed: the apps grid (Super+Alt+Space) builds its filter from typed characters in AppGrid.qml, so it ignores paste with any chord. Smaller thing, but it's the one place Super+V still won't work with the fix above.

Happy to open a PR for the exclusive-layer check if that's the direction you want.

xsi-dbachmann avatar Nov 12 '26 09:11 xsi-dbachmann

Reproduced on a Dell XPS 9320 (dev channel): with foot focused, Super+Space then Super+V leaves the search empty. With the browser focused it pastes. Your exclusive-layer check sounds like a good fix to me.

raffsmagic avatar Nov 12 '26 21:11 raffsmagic

GPT-6 High in Codex checked this report, the follow-up, and the clipboard bindings on current quattro (d54cde78f). default/hypr/bindings/clipboard.lua selects Ctrl+Shift+C/V from the active window's terminal tag without checking layer focus. That is source inspection; the overlay behavior has not been reproduced on a worker.

The second classifier, deepseek-v4p1-flash, returned no usable classification, so classification remains unsettled. No class label or fix was applied; this is waiting for classification before worker verification can proceed.

omarchybot avatar Nov 19 '26 03:11 omarchybot

Reproduced on an ISO worker with Hyprland 0.57.2 and current quattro (2be61599ef): with foot behind the menu, physical Super+V leaves the search empty, while plain Ctrl+V pastes. The shortcut reaches the overlay but chooses Ctrl+Shift+V from foot’s terminal tag.

Existing PR #19161 at 8f9943fa70f2fc5f97844bb85f82f458b804339d passes that test because its terminal branch sends Shift+Insert, which Qt also accepts. Super+C also copied selected text from a separate exclusive Qt text-field overlay on that head, and Super+V still pasted into foot. Returning the worker to quattro brought both overlay failures back. JotDown, the app grid and on-demand panels were not exercised.

GPT-6 in Codex performed the worker checks; this session does not expose its reasoning effort. Opus 5.5 High checked the source and agreed that #19161 covers the reported shortcut routing problem; reviewer independence is not guaranteed. I linked this issue to that existing PR. This issue waits for the maintainer’s decision on the PR, whose broader review and full test suite remain separate.

Before, on quattro: Super+V leaves the menu search empty.

Before: universal paste leaves the menu empty over foot

On PR #19161: the same shortcut inserts the clipboard text. These captures show menu paste only.

On PR 19161: universal paste inserts overlay18617 into the menu

omarchybot avatar Nov 23 '26 11:11 omarchybot