Re: Menu Item's Key Equivalents Affecting Other Item
Re: Menu Item's Key Equivalents Affecting Other Item
- Subject: Re: Menu Item's Key Equivalents Affecting Other Item
- From: Seth Willits <email@hidden>
- Date: Sat, 7 May 2005 16:45:26 -0700
On May 6, 2005, at 7:55 PM, Seth Willits wrote:
// Close Window Menu Item
[CloseWindowItem setKeyEquivalent:@"W"];
[CloseWindowItem setKeyEquivalentModifierMask:NSCommandKeyMask |
NSShiftKeyMask];
// Close Document Menu Item
[CloseDocumentItem setKeyEquivalent:@"W"];
[CloseWindowItem setKeyEquivalentModifierMask:NSCommandKeyMask];
And when the window is key, BOTH menu item's have Cmd-Shift-W as
their key equivalent.
And that's because I used a capital W instead of a lower case w.
Cocoa apparently is smart enough to automatically apply shift when
you use an uppercase letter. This isn't mentioned in the docs. I
submitted a suggestion.
Seth Willits
----------------------------------------------------------
Freak Software - http://www.freaksw.com/
ResExcellence - http://www.resexcellence.com/realbasic/
----------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden