• 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: modifier-flags with no key pressed and mouseDown 256, why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: modifier-flags with no key pressed and mouseDown 256, why?


  • Subject: Re: modifier-flags with no key pressed and mouseDown 256, why?
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 16 Jan 2009 15:47:34 -0800

On Fri, Jan 16, 2009 at 2:29 PM, Shawn Erickson <email@hidden> wrote:
> On Fri, Jan 16, 2009 at 1:15 PM, Dave DeLong <email@hidden> wrote:
>> My understanding is that the modifierFlag "256" means that no other
>> modifiers are pressed.  I haven't found it in the docs anywhere, but I
>> believe that you can count on "256" meaning "no flags".  Every machine I've
>> tested this on (I've done a bunch of CGEvent stuff recently) seems to agree.
>
> Unsafe assumption. You are just lucky that some lower bit (device
> dependent bit) is being set for you. I know of no documentation that
> says this bit will always set. Additionally if some other device
> dependent bit is set your assumption would be broken.

As a follow up you are depending on kCGEventFlagMaskNonCoalesced being
set if you are checking against a numeric value of 256. IIRC this will
not be set for events coming from event sources created with
kCGEventSourceStatePrivate and possibly other avenues.

-Shawn
_______________________________________________

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

  • Follow-Ups:
    • Re: modifier-flags with no key pressed and mouseDown 256, why?
      • From: Dave DeLong <email@hidden>
References: 
 >modifier-flags with no key pressed and mouseDown 256, why? (From: Alexander Reichstadt <email@hidden>)
 >Re: modifier-flags with no key pressed and mouseDown 256, why? (From: Dave DeLong <email@hidden>)
 >Re: modifier-flags with no key pressed and mouseDown 256, why? (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: how to archive NSNetService?
  • Next by Date: Re: Migration with abstract entities
  • Previous by thread: Re: modifier-flags with no key pressed and mouseDown 256, why?
  • Next by thread: Re: modifier-flags with no key pressed and mouseDown 256, why?
  • Index(es):
    • Date
    • Thread