aboutsummaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-07-16 11:54:32 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-07-31 13:02:54 +0200
commit672bf3e1ff5c5a31c2685ed558bd399789469a9c (patch)
tree1c158621b2a19c405502b937be1936eedb1ee12f /src/input
parentfefc0bc0a71556eb75352e2b611e50eb5d3bf9c2 (diff)
downloadniri-672bf3e1ff5c5a31c2685ed558bd399789469a9c.tar.gz
niri-672bf3e1ff5c5a31c2685ed558bd399789469a9c.tar.bz2
niri-672bf3e1ff5c5a31c2685ed558bd399789469a9c.zip
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
Diffstat (limited to 'src/input')
-rw-r--r--src/input/mod.rs11
1 files changed, 11 insertions, 0 deletions
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(),