• 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
How to get mouse location for a nonmouse event?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to get mouse location for a nonmouse event?


  • Subject: How to get mouse location for a nonmouse event?
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 26 Jul 2005 15:50:01 -0400
  • Organization: Rogue Research

Hello,

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).

How can I know the location of the mouse at the time a key press occurred?

(Why? In the app in question, certain key presses are a bit like mouse
clicks, and use the mouse location)

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

  • Follow-Ups:
    • Re: How to get mouse location for a nonmouse event?
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: Re: NSDocument newbie
  • Next by Date: NSScanner instert space every 2 characters
  • Previous by thread: Re: Composite values using Core Data and Cocoa Bindings
  • Next by thread: Re: How to get mouse location for a nonmouse event?
  • Index(es):
    • Date
    • Thread