From 4f043133bc0365283fbb7aafd81a80dc3e2cecee Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 23 Jul 2024 00:05:33 -0400 Subject: [PATCH] fix: intercept modifiere press for shortcut with no key --- src/input/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 306dff50..e2bbcb91 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -435,6 +435,7 @@ impl State { } // handle the rest of the global shortcuts + let mut intercepted = false; let mut can_clear_modifiers_shortcut = true; if !shortcuts_inhibited { let modifiers_queue = seat.modifiers_shortcut_queue(); @@ -454,6 +455,7 @@ impl State { if !modifiers_bypass && binding.key.is_none() && state == KeyState::Pressed && cosmic_modifiers_eq_smithay(&binding.modifiers, modifiers) { modifiers_queue.set(binding.clone()); can_clear_modifiers_shortcut = false; + intercepted = true; } if ( @@ -482,7 +484,11 @@ impl State { // keys are passed through to apps std::mem::drop(shell); - FilterResult::Forward + if intercepted { + FilterResult::Intercept(None) + } else { + FilterResult::Forward + } }, ) .flatten()