Hi,

Thanks, I’m looking at it now.

I’m a bit confused over the keyboard handling. I would have thought that the 
processing would take place on the KeyUp event, but it seems like its occurring 
on the KeyDown event which is where I am going wrong. 

I’m not sure what use NSKeyUp is in this case? The other thing is that a 
KeyDown with the AutoRepeat flag == YES seems to imply a an NSKeyUp? IOW, the 
events I see are:

NSKeyDown       Repeat == NO
NSKeyDown       Repeat == YES   ) If the Key is held down…..
NSKeyDown       Repeat == YES   )
NSKeyDown       Repeat == YES   )
NSKeyDown       Repeat == YES   )
NSKeyUp Repeat == NO

All the Best
Dave
  

> On 18 Jul 2016, at 13:05, dangerwillrobinsondan...@gmail.com wrote:
> 
> You might review the Event programming guide (especially the part about short 
> circuiting) and the responder chain. 
> That will pull this together in some detail. 
> 
> Sent from my iPhone
> 
>> On Jul 18, 2016, at 7:57 PM, Dave <d...@looktowindward.com> wrote:
>> 
>> 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/dangerwillrobinsondanger%40gmail.com
>> 
>> This email sent to dangerwillrobinsondan...@gmail.com


_______________________________________________

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