Hi Alastair,

Thanks a lot for this - it makes my life harder but at least I know how it 
works now.

All the Best
Dave

> On 17 Jul 2016, at 21:03, Alastair Houghton <alast...@alastairs-place.net> 
> wrote:
> 
> On 17 Jul 2016, at 14:06, Dave <d...@looktowindward.com> wrote:
>> 
>> My question is, do the keyboard and Mouse Down Events come in pairs, so that 
>> the following would/should not occur:
> 
> No.  KeyDown happens when the key goes down, KeyUp happens when they key 
> comes back up.  Likewise with MouseDown and MouseUp, and they can happen in 
> any order relative to one another (or relative to another KeyDown/Up or 
> MouseDown/Up).
> 
>> Thanks a lot for any info on this. From looking at it, I think that the 
>> MouseDown/Up and KeyboardDown/Up must come if pairs with no events to the 
>> other device(s) in between, but it would be nice to know for sure!
> 
> The reason you see this kind of behaviour sometimes is that *some* views 
> process events in a loop in their -mouseDown: handler.  See this blog post I 
> wrote in 2007 about event handling, which shows two different ways of 
> handling -mouseDown: and talks a bit about eating keypresses during 
> processing.
> 
>  https://alastairs-place.net/blog/2007/11/19/commands-and-mo/
> 
> Kind regards,
> 
> Alastair.
> 
> --
> http://alastairs-place.net
> 


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to