I'm writing an application that allows access to other applications' menu items via the accessibility framework. I have no problem obtaining the list of menus, their menu items, etc..
As far as I can see, however, the accessibility framework does not give access to the keyboard shortcuts for each item.
More concretely, if my app presents the Finder's File -> New Finder Window menu item, I would like to annotate it on screen with Command-N, so the user can learn the shortcuts by heart.
At the moment I see no way of getting that information. If not via the AXUIElement accessibility framework, how else can one get that info?
Any help would be much appreciated.
I have managed to find
AXMenuItemCmdCharand associatedAXUIElementattributes that actually have the information I'm after. Unfortunately, the Swift framework that I use to bridge the C-level Carbon accessibility APIs defines a convenient enum for all the attributes.. only it's not quite all the attributes :-(