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: "Sean McBride" <email@hidden>
- Date: Wed, 27 Jul 2005 11:56:06 -0400
- Organization: Rogue Research
On 2005-07-26 18:48, Timothy J. Wood said:
>> 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).
Well, I guess that will have to do unless someone else knows a better
way... ideally I'd like to know the mouse position at the exact time of
the key down event, not slightly later.
Thanks!
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
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