Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cosmic_atspi_v1 protocol #759

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Add cosmic_atspi_v1 protocol #759

merged 1 commit into from
Oct 31, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Aug 22, 2024

This works with the receive example of reis using LIBEI_SOCKET=/tmp/atspi-ei-kb.socket. I've also worked on changes to at-spi2-core, so I'll now be able to try testing it...

If a version of this is ultimately used, it will need a secure way to pass the socket to accessibility tools. Putting it in /tmp is a placeholder.

@ids1024
Copy link
Member Author

ids1024 commented Aug 23, 2024

It's just a hacky prototype at the moment, but this now partly works with https://github.com/ids1024/at-spi2-core/tree/atspi-ei.

Orca keybindings now work, but the keys are also sent to applications. We need something like X11's XIGrabKeycode to register a key combination. But all we need to do is have the compositor track those grabs and not send them to applications. We don't need to feed all input synchronously through the screen reader or anything.

I think that's pretty much the only other thing we need for parity with AtspiDeviceX11?

We'll also need a secure mechanism to start the screen reader, and only give it access to this.

@ids1024
Copy link
Member Author

ids1024 commented Oct 31, 2024

I've fixed an unwrap panic I noticed sometimes when killing orca, and added a workaround to disable caps lock state. We probably need to add a request to the protocol when a virtual modifier is added.

I think we can merge this now, with the understanding that it will be improved later, and won't cause issues when the protocol isn't in use.

@ids1024 ids1024 marked this pull request as ready for review October 31, 2024 17:28
@ids1024 ids1024 requested a review from Drakulix October 31, 2024 17:28
src/input/mod.rs Outdated
.active_virtual_mods
.insert(event.key_code());

tracing::error!(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we downgrade this to at least info (probably debug)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, that's a debugging line I added at some point that I didn't mean to commit. (Downgrading to debug would be appropriate).

src/input/mod.rs Outdated
@@ -1649,6 +1707,16 @@ impl State {
return FilterResult::Intercept(None);
}

// TODO modifiers queue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this todo problematic? Can this currently interact weirdly with modifier only keybindings? (mostly for future reference to understand what needs to be done here.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was just a comment to remind myself to look into whether this interacts problematically with that at some point. Not for any known issue.

I'll just remove that comment, but more testing could definitely be done in general.

Used to provide a backend for `AtspiDevice` in `at-spi2-core`, so Orca
keybindings can work.
@Drakulix Drakulix merged commit 90883c6 into master Oct 31, 2024
1 check passed
@jackpot51 jackpot51 deleted the atspi-ei branch October 31, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants