• 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
Setting key equivalent for menus depending on window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting key equivalent for menus depending on window


  • Subject: Setting key equivalent for menus depending on window
  • From: Martin Hewitson <email@hidden>
  • Date: Sat, 19 Oct 2013 12:58:40 +0200

Dear list,

I have an app with tabs and I’m trying to change the default 'close' keyboard equivalent for only the main window which has the tabs. I’d like to have

Main Window with tabs:
	close (cmd-shift-w)
	close tab (cmd-w)

All other windows:
	close (cmd-w)
	close tab (inactive, no keyboard shortcut)

This is pretty much the way things work in Xcode.

So, my question is, is there a smart way to do this, or do I need to implement -validateMenuItem: on every window in the app and set the keyboard shortcuts there?

Thanks for any insights,

Martin




_______________________________________________

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


  • Follow-Ups:
    • Re: Setting key equivalent for menus depending on window
      • From: Andy Lee <email@hidden>
  • Prev by Date: Re: NSDocument and KVO compliance
  • Next by Date: Re: Setting key equivalent for menus depending on window
  • Previous by thread: Re: iOS Storyboard - on boarding - skip
  • Next by thread: Re: Setting key equivalent for menus depending on window
  • Index(es):
    • Date
    • Thread