• 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
how to save keyboard shortcuts?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to save keyboard shortcuts?


  • Subject: how to save keyboard shortcuts?
  • From: HAMSoft Admin <email@hidden>
  • Date: Wed, 25 Jun 2008 11:04:46 -0400

I'm really new at this so please be kind!

I recently learned how to make menu item keyboard shortcuts for my program. The problem is that on the next launch of the program the shortcuts are gone, so they are not being automatically saved. Is there a setting in IB for my menu to enable auto-saving of them or do I have to do it manually? I'm setting them with something like this:

[menuitem setKeyEquivalentModifierMask:NSControlKeyMask | NSCommandKeyMask];
[menuitem setKeyEquivalent:@"U"];


If I have to do it manually I'm not sure how. First to get the modifier keys for a particular menu item I'm using this...

int thekmm = [menuitem keyEquivalentModifierMask];

But I don't understand the returned integer. Plus do I have to create an array of modifiers and keys for every menu item in my program and save/restore that on every launch? Thant doesn't make sense, so there must be an easier way.

Thanks,
Hank
_______________________________________________

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: how to save keyboard shortcuts?
      • From: Bob Warwick <email@hidden>
References: 
 >Where can I get some examples of if() conditionals being used with string variables in Objective-C (From: Papa-Raboon <email@hidden>)
 >Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C (From: Dan Uff <email@hidden>)

  • Prev by Date: Re: Is it possible for several NSURLConnection instances to share one delegate?
  • Next by Date: Re: how to save keyboard shortcuts?
  • Previous by thread: Re: Where can I get some examples of if() conditionals being used with string variables in Objective-C
  • Next by thread: Re: how to save keyboard shortcuts?
  • Index(es):
    • Date
    • Thread