OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
wayland-compat low occasional DISPUTE

VM and remote-desktop windows either swallow all your Hyprland keybinds or leak keys to the compositor

omarchyarchendeavouroscachyosmanjarohyprlanddesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The cause and the protocol story are correct, and every flag the record names is real. I checked the current Lua wiki (hyprwm/hyprland-wiki content/configuring/core/binds/flags.md): dont_inhibit ("Bypasses the app's requests to inhibit keybinds"), allow_input_capture ("When input is captured by a client, this bind will still be processed"), locked and repeating are all in the flag table, and content/configuring/core/rules/window-rules.md lists no_shortcuts_inhibit ("Disallows the app from inhibiting your shortcuts") as a dynamic effect. The { name = ..., match = {...} } rule schema and the wpctl volume binds match the wiki's own examples. The defect is the escape hatch, the one thing the record's own danger note says you must always have. It is written as hl.dsp.exec_cmd("hyprctl dispatch fullscreen 0"), and on Hyprland 0.56 hyprctl dispatch is documented as "a shorthand for eval 'hl.dispatch(...)'" (content/configuring/core/advanced-configuration/using-hyprctl.md), so the bare-dispatcher form fullscreen 0 is evaluated as Lua and errors instead of un-fullscreening. A user trapped in a fullscreen VM presses the escape bind and nothing happens. The correct dispatcher is hl.dsp.window.fullscreen({ action = "unset" }) (dispatchers.md: fullscreen({ window?, action?, mode?, layout_aware? }), action can be toggle/set/unset), and it should be dispatched directly rather than shelling out to hyprctl. Two additions while correcting: hl.dsp.release_input_capture() is a documented general dispatcher and is the right partner for the allow_input_capture case, and if the app never requests inhibition at all (toggling the rule changes nothing) no window rule can help. A submap that unbinds SUPER is the only compositor-side answer, using hl.define_submap / hl.dsp.submap("reset") / submap_universal as documented in binds/submaps.md.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

Adding a broad no_shortcuts_inhibit rule (for example matching class = ".*") makes SUPER and other modifier combos unusable inside every VM and remote session, which is usually worse than the original complaint. Match one specific class. Conversely, if you let an app inhibit everything and define no dont_inhibit escape bind, a fullscreen VM that grabs the keyboard can leave you unable to leave it without switching to a TTY with Ctrl+Alt+F2.

Symptom

In a fullscreen VM (virt-manager, GNOME Boxes, VirtualBox) or a VNC/RDP client (Remmina, Vinagre), pressing SUPER switches my Hyprland workspace instead of opening the guest's start menu. The guest never sees the key. Or the opposite: while that window is focused none of my Hyprland binds work at all, I cannot change workspace or adjust volume, and I have to alt-tab out first.

Cause

Both behaviours come from the keyboard-shortcuts-inhibit Wayland protocol. A client that requests inhibition is handed every key including the compositor's own binds. That is what makes SUPER reach a guest OS, and also what makes your workspace binds go dead. A client that does not request it (or that you have configured Hyprland to refuse) leaks modifier combos to the compositor instead. Hyprland exposes both sides: a per-window rule to refuse an app's inhibit request, and per-bind flags that survive inhibition.

Fix

Find the window's class first:


hyprctl clients | grep -E '^\s+(class|initialClass|title)'

**Case A: the app is stealing your binds and you want them back.** Refuse its inhibit request:


-- ~/.config/hypr/hyprland.lua
hl.window_rule({
  name = "no-inhibit-remote-desktop",
  match = { class = "^(org.remmina.Remmina)$" },
  no_shortcuts_inhibit = true
})

**Case B: you want the app to keep grabbing keys, but a few binds must always work.** Mark those binds dont_inhibit (bypasses the app's inhibit request) and/or locked (also fires while an input inhibitor such as a lockscreen is active). Note that hyprctl dispatch on 0.55+ evaluates its argument as Lua, so do **not** shell out to hyprctl dispatch fullscreen 0. Call the dispatcher directly:


-- escape hatch that always works, even inside a fullscreen VM
hl.bind("SUPER + SHIFT + Escape", hl.dsp.window.fullscreen({ action = "unset" }), { dont_inhibit = true })

-- media keys that keep working everywhere
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"),
        { repeating = true, dont_inhibit = true, locked = true })
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"),
        { repeating = true, dont_inhibit = true, locked = true })

For clients that use input *capture* rather than shortcut inhibition (some remote-desktop and input-sharing tools), the bind flag is allow_input_capture, and there is a dispatcher that tears the capture session down:


hl.bind("SUPER + SHIFT + Escape", function()
  hl.dispatch(hl.dsp.release_input_capture())
  hl.dispatch(hl.dsp.window.fullscreen({ action = "unset" }))
end, { dont_inhibit = true, allow_input_capture = true })

**If toggling the rule changes nothing**, the app is not using the protocol at all. It never requests inhibition, so there is nothing for Hyprland to refuse and no way to hand it SUPER either. The only compositor-side answer is a submap that clears your binds while you work in the guest:


hl.bind("SUPER + SHIFT + V", hl.dsp.submap("vm"))

hl.define_submap("vm", function()
  -- nothing is bound in here, so SUPER and friends all reach the guest
  hl.bind("SUPER + SHIFT + V", hl.dsp.submap("reset"))
end)

If you ever get stuck in it with no terminal, switch to a TTY and run hyprctl dispatch --instance 0 'hl.dsp.submap("reset")'.

Apply without restarting:


hyprctl reload

Always keep at least one dont_inhibit escape bind, or a fullscreen VM that grabs the keyboard leaves you with no way out except a TTY switch.

On Hyprland 0.54 and older the same rule and bind flags exist in hyprlang form. See the pinned 0.54 wiki at <https://wiki.hypr.land/0.54.0/> for that syntax.

Verify

hyprctl clients gives you the class. After hyprctl reload, focus the VM/RDP window and press SUPER. With the rule applied, the compositor bind fires. Without it, the key reaches the guest. Your dont_inhibit escape bind must work in both cases.

Sources

vm-remote-desktop-steals-or-leaks-compositor-binds