Re: Showing numpad key equivs in menu items
Re: Showing numpad key equivs in menu items
- Subject: Re: Showing numpad key equivs in menu items
- From: Steve Mills <email@hidden>
- Date: Tue, 21 May 2013 14:42:51 -0500
On May 7, 2013, at 21:00:00, Allan Odgaard <email@hidden> wrote:
> TextMate’s implementation is here https://github.com/textmate/textmate/blob/master/Frameworks/OakAppKit/src/NSMenuItem Additions.mm#L170-L189 and sets the title as an attributed string using an NSTextTableBlock to have the key equivalent string show as the second column. This is fairly unobtrusive and the only (user visible) shortcoming I have found is that it doesn’t left/right align the key/modifier glyphs and writes out F1-Fn instead of using the special glyphs for these keys.
Allan, I've tried using your approach, which works better than what we did before (setting the title to "Do Something numpad1", so it was never even close to being in the key equiv column). But what do you do about having the actual keyEquivalent set? If I leave that set at, for instance, command-1, it draws to the right of my attributed title. Do you clear the key equiv from menu items and use your own key equiv lookup elsewhere?
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden