Re: How to get mouse location for a nonmouse event?
Re: How to get mouse location for a nonmouse event?
- Subject: Re: How to get mouse location for a nonmouse event?
- From: "Timothy J. Wood" <email@hidden>
- Date: Tue, 26 Jul 2005 18:48:50 -0700
On Jul 26, 2005, at 12:50 PM, Sean McBride wrote:
How does one get the mouse location at the time an event occurred?
There is "locationInWindow" who's docs say "Returns the receiver's
location in the base coordinate system of the associated window. For
nonmouse events the return value of this method is undefined.". But I
need to know the mouse position for a nonmouse event (keydown & keyup
events actually).
+[NSEvent mouseLocation] should work unless you require very
extremely
fine synchronization of the time of the event generation and the
grabbing
of the position (i.e., the mouse is moving).
-tim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden