• 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: -[NSMenuItem setKeyEquivalent] not working for some keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSMenuItem setKeyEquivalent] not working for some keys


  • Subject: Re: -[NSMenuItem setKeyEquivalent] not working for some keys
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 19 Oct 2006 11:46:36 +0100

OS X offers the ability for you to set custom keyboard shortcuts for any menu in any app. Perhaps something is overriding things?

Mike.

On 18 Oct 2006, at 21:22, Ken Victor wrote:

the app i'm developing lets users specify the keyboard shortcuts to use for menu items. this has been working for several months now. however, i noticed yesterday that if i attempt to set a shortcut (via -[NSMenuItem setKeyEquivalent]) of command-1 / command-2 / command-3 / command-4 it no longer "takes".

while debugging, i've discovered the following: if i examine the menu item before and after calling setKeyEquivalent, i see the private iVar _keyEquivalent changing properly. however if i "po [menuItem keyEquivalent]" from the debugger console window the debugger prints out <object returned empty description> and the menu does not show the shortcut as being set. (note that i do also use setKeyEquivalentModifierMask to set the appropriate mask.)

i can set shortcuts to other command-<X> (where X is anything but 1, 2, 3, or 5) and if i set a shortcut to use modifier keys other than or in conjunction with the command key it also works. additonally, if i set menu item shortcuts in IB, it works fine for command 1-4/

now i know (after many frustrating hours of various debugging and testing) that this has something to do with my user account, because if i login as a different user or boot from a different partition, the problem goes away. i also know that this is not related to any of my login startup items (as set in system prefs for my account) because if i remove all of them the problem persists.

has anyone encountered anything like this before?

can anyone suggest how i can find this problem? or point me to some documentation as to how to find the problem?

thanx very much,
ken

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ 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: -[NSMenuItem setKeyEquivalent] not working for some keys
      • From: Ken Victor <email@hidden>
References: 
 >-[NSMenuItem setKeyEquivalent] not working for some keys (From: Ken Victor <email@hidden>)

  • Prev by Date: Re: Force app to be key
  • Next by Date: SWF support on NSMovie
  • Previous by thread: -[NSMenuItem setKeyEquivalent] not working for some keys
  • Next by thread: Re: -[NSMenuItem setKeyEquivalent] not working for some keys
  • Index(es):
    • Date
    • Thread