From 09be56fb6b9bb0871aeef467cdc2d67db25649f0 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:40 +0100 Subject: feat(sway): refuse keyboard-shortcut inhibit from virt-viewer/manager Spice/virt-viewer ask sway for keyboard-shortcuts-inhibit so they can forward the Super key to the guest. That swallows all $mod+... binds on the host while the VM window is focused. Refuse the inhibit for those three app_ids; sway forwards Super to the guest only when the keyboard is explicitly grabbed (click-into-VM + virt-viewer's own Ctrl+Alt toggle), not via the wm-bind shortcut. --- dot_config/sway/config | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dot_config') diff --git a/dot_config/sway/config b/dot_config/sway/config index ac7acb3..3d4e075 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -53,6 +53,12 @@ for_window [class="Tor Browser"] floating enable for_window [app_id="org.mozilla.Thunderbird" title=".*Mozilla Thunderbird$"] mark --add tb-main for_window [shell=".*"] inhibit_idle fullscreen +# virt-viewer / virt-manager grab the Mod key via the keyboard-shortcuts-inhibit +# Wayland protocol. Refuse so $mod+... bindings keep working while the VM has focus. +for_window [app_id="virt-viewer"] shortcuts_inhibitor disable +for_window [app_id="remote-viewer"] shortcuts_inhibitor disable +for_window [app_id="virt-manager"] shortcuts_inhibitor disable + # ── Standard keybinds (sway defaults) ───────────────────────────────────────── bindsym $mod+Return exec $term bindsym $mod+Shift+Return exec $term -e yazi -- cgit v1.3.1