From 1c35339076e615a32e43e7dd54f50ebe12ec9427 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Thu, 20 Nov 2025 13:03:59 -0800 Subject: [PATCH] input: Use `suppresssed_keys()` for a11y grabs This mostly seems to behave the same way, but presumably we want a key release to be treated as grabbed if and only if the press had been. --- src/input/mod.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/input/mod.rs b/src/input/mod.rs index 0fcfa936..4b7a9e07 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1833,12 +1833,14 @@ impl State { return FilterResult::Intercept(None); } - if self.common.a11y_keyboard_monitor_state.has_keyboard_grab() - || self - .common - .a11y_keyboard_monitor_state - .has_key_grab(modifiers, handle.modified_sym()) + if event.state() == KeyState::Pressed + && (self.common.a11y_keyboard_monitor_state.has_keyboard_grab() + || self + .common + .a11y_keyboard_monitor_state + .has_key_grab(modifiers, handle.modified_sym())) { + seat.supressed_keys().add(&handle, None); return FilterResult::Intercept(None); }