• 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: Keyboard/Mouse Event Interaction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyboard/Mouse Event Interaction


  • Subject: Re: Keyboard/Mouse Event Interaction
  • From: Steve Mills <email@hidden>
  • Date: Mon, 18 Jul 2016 08:00:21 -0500

On Jul 18, 2016, at 07:52:02, Dave <email@hidden> 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 (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: Keyboard/Mouse Event Interaction
      • From: email@hidden
References: 
 >Keyboard/Mouse Event Interaction (From: Dave <email@hidden>)
 >Re: Keyboard/Mouse Event Interaction (From: Alastair Houghton <email@hidden>)
 >Re: Keyboard/Mouse Event Interaction (From: Dave <email@hidden>)
 >Re: Keyboard/Mouse Event Interaction (From: email@hidden)
 >Re: Keyboard/Mouse Event Interaction (From: Dave <email@hidden>)

  • Prev by Date: Re: Keyboard/Mouse Event Interaction
  • Next by Date: Re: Keyboard/Mouse Event Interaction
  • Previous by thread: Re: Keyboard/Mouse Event Interaction
  • Next by thread: Re: Keyboard/Mouse Event Interaction
  • Index(es):
    • Date
    • Thread