From 672bf3e1ff5c5a31c2685ed558bd399789469a9c Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 16 Jul 2025 11:54:32 +0300 Subject: Implement org.fd.a11y KeyboardMonitor Makes Orca work with niri: - keyboard watching and announcing everywhere (not just GTK 3 windows) - grabs for the Orca modifier (with double-press to pass through) and keystrokes --- src/input/mod.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/input/mod.rs') diff --git a/src/input/mod.rs b/src/input/mod.rs index 76f575b9..2aba1f97 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -359,6 +359,17 @@ impl State { let is_inhibiting_shortcuts = self.is_inhibiting_shortcuts(); + // Accessibility modifier grabs should override XKB state changes (e.g. Caps Lock), so we + // need to process them before keyboard.input() below. + #[cfg(feature = "dbus")] + if self.a11y_process_key( + Duration::from_millis(u64::from(time)), + event.key_code(), + event.state(), + ) { + return; + } + let Some(Some(bind)) = self.niri.seat.get_keyboard().unwrap().input( self, event.key_code(), -- cgit