Need API for screen reader to monitor/grab keys
Orca (the GNOME screen reader) needs to be able to monitor and grab keys. Traditionally, this has been handled at the application/toolkit level, with the toolkit notifying AT-SPI of key presses and allowing AT-SPI to relay them to Orca and potentially consume them, but this approach is not ideal and is not being carried forward in GTK 4.
I have added API into at-spi2-core to allow Orca to monitor and grab keys, with the idea that it would be an abstraction with multiple back ends (see atspi-device.c). Currently, I have a back end for X11 and a legacy back end using the old API. I would like for it to support Mutter/Wayland, but we need to have support for it in the compositor. I think that it makes sense to have two separate APIs, one for monitoring key presses and one for grabbing keys, since they are distinct tasks. Also, we need to consider security, since we don't want to just allow any application to use these APIs willy-nilly.
Comments welcome. This may or may not involve new Wayland protocols. Regardless, it would need changes to the compositor, so I'm opening an issue here.
References: