On Mar 27, 2014, at 13:24:33, Ken Thomases <k...@codeweavers.com> wrote:
> If you want to know what key was pressed in a physical (or pseudo-physical) > sense, you should pay attention to the keyCode of the NSEvent. If you want > to know what a given key code maps to with the user's current keyboard > layout, you would use UCKeyTranslate() to translate from key code to > character. You specify the modifier keys which should affect translation, > and for your purposes you'd specify none. Add another "duh" to my pile. I was only looking at a method I'd added to our NSMenuItem class extension that takes an NSString for the character, forgetting that the entire NSEvent is sent to the performKeyEquivalent method, of which we override in our menu subclass. I already have code that uses USKeyTranslate, so I can leverage that into there. Thanks. -- Steve Mills office: 952-818-3871 home: 952-401-6255 _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com