• 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: Toggle an object (image) when Command key is pressed: flagsChanged?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Toggle an object (image) when Command key is pressed: flagsChanged?


  • Subject: Re: Toggle an object (image) when Command key is pressed: flagsChanged?
  • From: Kyle Sluder <email@hidden>
  • Date: Tue, 26 Jul 2011 14:11:35 -0700

On Tue, Jul 26, 2011 at 12:50 PM, Patrick Robertson
<email@hidden> wrote:
> First, you can see from the code that I can't seem to find a mask for when
> 'no' modifier keys are pressed. This method does get called for key downs
> and key ups. It seems 'no keys' corresponds to 0x100, but is there no
> constant I can use?

Did you remember to AND the modifierFlags with
NSDeviceIndependentModifierFlagsMask?

>
> Secondly, this method seems to get called when other key combos are pressed
> (e.g. ⌘S or ⌘Q). This means the object/image will flick back/forward, which
> isn't entirely desirable.

In either 10.5 or 10.6, Apple changed the implementation of NSToolbar
to avoid this flickering by delaying for a fraction of a second before
changing its image in response to a -flagsChanged: event. Check the
AppKit release notes for more info.

--Kyle Sluder
_______________________________________________

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

References: 
 >Toggle an object (image) when Command key is pressed: flagsChanged? (From: Patrick Robertson <email@hidden>)

  • Prev by Date: Re: App won't get to my code in Lion
  • Next by Date: Re: Creating a TCP server?
  • Previous by thread: Re: Toggle an object (image) when Command key is pressed: flagsChanged?
  • Next by thread: 1. Creating a TCP server? (Rick Mann)
  • Index(es):
    • Date
    • Thread