feat: expose keyboard shortcuts to AT-SPI#668
feat: expose keyboard shortcuts to AT-SPI#668ndarilek wants to merge 1 commit intoAccessKit:mainfrom
Conversation
DataTriny
left a comment
There was a problem hiding this comment.
Hey, thanks for that. What is the expected format though? I did not tackle this property before because I don't think we can just pass whatever string the user provided. Some platforms may require a specific format, so we have to decide which one we want from the user and apply a mapping if necessary. Implementing this property will require you to check what Chromium does. Even if you just want to implement it for the Unix adapter, you'll still have to ensure that we won't have to change the format when we come to the other platforms.
A minimal test application (pasting a modified version of the winit example in your pull request description for instance) would also be appreciated.
| } | ||
|
|
||
| fn keyboard_shortcut(&self) -> Option<&str> { | ||
| self.0.data().keyboard_shortcut() |
There was a problem hiding this comment.
We have dedicated getters to Node for each property in the consumer crate, please add a new one.
|
What do you think about switching to a more structured approach for keyboard shortcuts--a struct with modifiers rather than just a plain string, similar to the recent color changes? There do appear to be subtleties per platform. In particular Orca requires ";;" with a hacky fallback that presents the keyboard shortcut if it a) lacks the trailing semicolons and b) contains "ctrl". |
|
Having dedicated types would indeed make it hard to misuse the property. But such types are quite big, taking keyboard-types as reference. We wouldn't want to depend on that crate, but we could adapt |
No description provided.