On Jul 18, 2016, at 07:52:02, Dave <d...@looktowindward.com> wrote: > > 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
Nope, as you discovered, KeyDown is where the action usually happens for most things, because if it waited for KeyUp, then all the KeyRepeats that came after the KeyDown would be missed, and you don't want to queue them all up and release them on KeyUp. Just think of how it works when you're in a text editor and hold down a key (just make sure you have that stupid system pref set to NOT show the silly alt key popup thing, but work like a real key repeat should). -- Steve Mills Drummer, Mac geek _______________________________________________ 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