• 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: Arrow keyEquivalent in InterfaceBuilder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arrow keyEquivalent in InterfaceBuilder


  • Subject: Re: Arrow keyEquivalent in InterfaceBuilder
  • From: Bill Cheeseman <email@hidden>
  • Date: Fri, 31 Dec 2004 17:39:57 -0500

on 2004-12-31 4:15 PM, Lorenzo at email@hidden wrote:

> in InterfaceBuilder, open the menu object, then just double click on the
> "Key-Equivalent" field in the "menu item" line (not in the inspector), then
> when ready hit the arrow key on your keyboard. You will see the arrow symbol
> in the "Key-Equivalent" field. Now, in the Inspector panel, you can even add
> modifier keys like Comman, Option, or Control key.

<Sigh> I wasted so much time doing this in code. I suppose this is
documented somewhere, and I just never noticed it?

Will the nib file work when you run the app under Mac OS X 10.2 Jaguar?

A code way to do this is to put a few lines of code in -awakeFromNib, like
this:

unichar rightwardsArrow = 0x2192;
[[self myMenuItem] setKeyEquivalent:[NSString
stringWithCharacters:&rightwardsArrow length:1]];
[[self myMenuItem] setKeyEquivalentModifierMask:0]; // Command key


--

Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com

PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes


 _______________________________________________
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

  • Follow-Ups:
    • Re: Arrow keyEquivalent in InterfaceBuilder
      • From: Edward Hillenbrand <email@hidden>
References: 
 >Re: Arrow keyEquivalent in InterfaceBuilder (From: Lorenzo <email@hidden>)

  • Prev by Date: Re: Displaying Swedish Characters?
  • Next by Date: Re: Displaying Swedish Characters?
  • Previous by thread: Re: Arrow keyEquivalent in InterfaceBuilder
  • Next by thread: Re: Arrow keyEquivalent in InterfaceBuilder
  • Index(es):
    • Date
    • Thread