• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Menu Item's Key Equivalents Affecting Other Item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Menu Item's Key Equivalents Affecting Other Item (From: Seth Willits <email@hidden>)

  • Prev by Date: selectNext doesn't tickle NSArrayController's selectionIndexes binding
  • Next by Date: Radio Button Matrix Draws Multiple Selections
  • Previous by thread: Menu Item's Key Equivalents Affecting Other Item
  • Next by thread: Re: Menu Item's Key Equivalents Affecting Other Item
  • Index(es):
    • Date
    • Thread