• 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
post hidden mouse events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

post hidden mouse events


  • Subject: post hidden mouse events
  • From: "Giovanni Donelli" <email@hidden>
  • Date: Thu, 3 May 2007 15:18:52 +0200

Dear Folks,
     my app needs to synthesize mouse events. To do so I have first
used the following API:

CGError CGPostMouseEvent (
  CGPoint mouseCursorPosition,
  boolean_t updateMouseCursorPosition,
  CGButtonCount buttonCount,
  boolean_t mouseButtonDown,
  ...
);

However as documentation says:

"This function is not recommended for general use because of
undocumented special cases and undesirable side effects."

And it is indeed buggy as hell... there are undesirable side effects
on some user machine, so following the documentation advice:

I am using CGEventCreateMouseEvent and posting the event with CGEventPost.

Now I found lots of bugs (in the API) that were discussed on this list
already, but I did figure out finally a way to make everything work.

The only issue I have with this (CGEventPost solution) is that the
cursor also change position on the screen...

Any suggestion on how I can post mouse events without updating
MouseCursorPosition as  in the CGPostMouseEvent API??? relocating the
mouse each time after a mouse down/up operation is not an option.

Thank you,
Giovanni
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Model windows stays on top when i switch to another App ( cmd+tab )
  • Next by Date: Re: post hidden mouse events
  • Previous by thread: Model windows stays on top when i switch to another App ( cmd+tab )
  • Next by thread: Re: post hidden mouse events
  • Index(es):
    • Date
    • Thread