I have been trying to figure out a way to get all the available shortcuts from an application without luck.

Anyone have any pointers on how to get that information at runtime?

For your own application this isn't too hard. Just start with -[NSApp mainMenu] and recursively visit all submenus, checking their keyEquivalents. You should message each menu's delegate for those that are dynamically populated.

As for scanning other applications, I imagine you'd need to look into AppleScript or the Accessibility APIs, neither of which I know enough about to offer any advice.

~Martin

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to