• 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: setKeyEquivalent: gives two action invocations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setKeyEquivalent: gives two action invocations


  • Subject: Re: setKeyEquivalent: gives two action invocations
  • From: "Ken Ferry" <email@hidden>
  • Date: Sat, 24 Mar 2007 03:31:42 -0700

Oh yeah.  That comment is mine too. :-)

-Ken

On 3/24/07, Wain Glaister <email@hidden> wrote:
Hi,

Take a look at <http://www.cocoadev.com/index.pl?
NSButtonFunctionKeyEquivalent>

It uses the same technique as suggested by Ken but at a higher level
and so will prevent the flicker.


Wain

On 23 Mar 2007, at 17:24, Roland Torres wrote:

> Hi Ken,
>
> This works well. The only slight side effect to this is that the
> button on the GUI flickers twice (once per key-down, once per key-
> up), but I can live with it!
>
> Thanks!
> Roland
>
> On Mar 22, 2007, at 9:41 PM, Ken Ferry wrote:
>
>> Hi Roland,
>>
>> This is a bug.  Key equivalents with the function key mask set and
>> without the command key modifier are sent for both key up and key
>> down.
>>
>> You can work around it in a future proof way with code like this:
>>
>> - (IBAction)myAction:(id)sender {
>>    if ([[NSApp currentEvent] type] == NSKeyUp)
>>        return;
>>    ...
>>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >setKeyEquivalent: gives two action invocations (From: Roland Torres <email@hidden>)
 >Re: setKeyEquivalent: gives two action invocations (From: "Ken Ferry" <email@hidden>)
 >Re: setKeyEquivalent: gives two action invocations (From: Roland Torres <email@hidden>)
 >Re: setKeyEquivalent: gives two action invocations (From: Wain Glaister <email@hidden>)

  • Prev by Date: Re: setKeyEquivalent: gives two action invocations
  • Next by Date: Re: using dvd as input source to core video api
  • Previous by thread: Re: setKeyEquivalent: gives two action invocations
  • Next by thread: Re: setKeyEquivalent: gives two action invocations
  • Index(es):
    • Date
    • Thread