On Jan 25, 2012, at 5:51 AM, Akhil Jindal wrote: > On Wed, Jan 25, 2012 at 5:09 PM, Ken Thomases <k...@codeweavers.com> wrote: > >> Oops, sorry. I should have said "cmdKey" instead of "cmdKeyBit", and I >> should have also said it needs to be right-shifted by 8 bits. So, try >> passing cmdKey >> 8. > > Yes. That worked! > Thanks a ton. I had spend so much time trying to figure this out. > > Could you point me to any documentation regarding this?
Um, nothing exactly on point. The UCKeyTranslate docs say to pass ((EventRecord.modifiers) >> 8) & 0xFF, and for an actual Command-N keyboard shortcut, that would be cmdKey >> 8. (Admittedly, that is in terms of ancient, pre-Carbon-let-alone-Cocoa Mac event types.) It just seems fairly self-evident that you'd want to / have to simulate what actually happens when a keyboard shortcut is processed. Also, if you have the Keyboard Viewer showing when a non-latin keyboard layout is selected, and you hold down the Command key, all of the keys show their latin key labels. Regards, Ken _______________________________________________ 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