• 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
Processing mouse clicks using Quartz events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Processing mouse clicks using Quartz events


  • Subject: Processing mouse clicks using Quartz events
  • From: Tomáš Znamenáček <email@hidden>
  • Date: Tue, 15 Feb 2011 17:53:08 +0100

Hello!

I have a CGEventTap and I would like to catch mouse click events. Detecting a mouse click event is easy, but I don’t want some of the clicks to get processed by the rest of the system. And I can’t figure out how.

The system only sends low-level events like mouseUp, mouseDown, mouseDragged and so on. When I receive a mouseDown event, I don’t know if it’s a part of a mouse click yet, could be a drag event. I have to wait for the following event – if it’s a mouseUp, I have a click. But if I want to process the click myself and keep it from going down the rest of the event queue, I can’t simply steal the mouseUp event, as the previous mouseDown was already sent.

I thought I could delay the mouseDown event and only send it later after receiving the corresponding mouseUp, but that feels wrong, I don’t want to delay all system mouseDown events just because of my application. Am I missing something?

Thank you,
Tomáš Znamenáček
_______________________________________________

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: Processing mouse clicks using Quartz events
      • From: Graham Cox <email@hidden>
  • Prev by Date: Animation doesn't reach end value
  • Next by Date: Re: Key equivalents for non-menu items
  • Previous by thread: Re: Animation doesn't reach end value
  • Next by thread: Re: Processing mouse clicks using Quartz events
  • Index(es):
    • Date
    • Thread