• 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: find out where is a key equivalent assigned
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find out where is a key equivalent assigned


  • Subject: Re: find out where is a key equivalent assigned
  • From: Greg Guerin <email@hidden>
  • Date: Fri, 10 Apr 2009 17:14:50 -0700

Georg Seifert wrote:

I have a old project with a big nib file and it seems that somewhere is a key equivalent defined for "ctrl+left cursor key". If I press "ctrl+left cursor key" nothing happend (option+left and everything else works fine).

Do you want to know what element has the key-equivalent "ctrl+left cursor key" assigned to it? Store your big nib as an xib file and search it as a text file.


The grep pattern to search for appears to be NSKeyEquiv. You will have to decipher the output, and narrow it down further, but if the problem is "Where is this key-equiv assigned, so I can figure out its responder chain or maybe remove the key-equiv", this is probably how I'd start searching for it.

On second thought, I'd probably start by creating a new Cocoa Application project with xib, add a key-equivalent of "ctrl+left cursor key" to an easily recognized element, such as the "Open" menu- item of the File menu, then find that element in the xml. That should tell me what the other NSKeyEquiv values will be when "ctrl +left cursor key" is the assigned key-equivalent, which would be very useful when doing the search.

This might even simplify things so simply using TextEdit.app to open the xib file (which is xml) and searching for the particular patterns identified earlier would tell me which element of the original big- nib-file has that key-equiv assigned to it.

You might also find the 'ibtool' command useful, or a nib-to-code tool like nib2objc:

http://kosmaczewski.net/2009/03/17/nib2objc/

  -- GG

_______________________________________________

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


  • Prev by Date: Re: find out where is a key equivalent assigned
  • Next by Date: Rendering OpenGL in timed loop (CoreVideo).
  • Previous by thread: Re: find out where is a key equivalent assigned
  • Next by thread: Using authorization to enumerate restricted folders?
  • Index(es):
    • Date
    • Thread