Re: How to get mouse moved events?
Re: How to get mouse moved events?
- Subject: Re: How to get mouse moved events?
- From: Public Look <email@hidden>
- Date: Sat, 24 Jan 2004 23:57:01 -0500
I am prepared to believe I am dense. Just because I don't understand
the reason for wanting to "observe" mouse moved events in other
applications doesn't mean there isn't a reason. So, why does your
customer want to "observe" the mouse moved events of other applications
in your application that stays on top ? For that matter, why do they
want an application that stays on top ? I am honestly curious why a
user wants a constantly updating display of where the mouse is in
another application. How do you convert the mouse events to meaningful
coordinates for the other application ? Do you use the accessibility
API or the Core Graphics API or do you somehow insert code in the
Window Server ?
On Jan 24, 2004, at 1:52 AM, Henry McGilton wrote:
On Friday, January 23, 2004, at 07:33 PM, Public Look wrote:
I am just curious. This forum has seen this exact question go by
several times. In all my long career, I have never wanted to steal
mouse events form other applications or even "monitor" them What are
(seemingly) so many people trying to do when they ask this question ?
What kind of application eavesdrops on other applications ? Are we
talking about automation tools like automated GUI testers ? Are we
talking about simulating focus follows mouse ? Are we talking about
tools to overcome a disability ? What's up ?
The issue is nothing to do with 'stealing mouse events from other
applications'.
I have an application that needs to stay on top and get mouse events
even when
it is not the active application --- I have to see the current mouse
position and
update a location display so that the user can see position
information as they
move the mouse around. I implemented the interception of mouse
location
events via NSTimer. I implemented this behaviour based on customer
feedback as
to what the customers wanted from my application.
If you have some brilliant suggestions as to how I could do this in
some fashion
that would not be construed as 'stealing mouse events from other
applications' or
'eavesdropping on other applications', I would very much appreciate
any advice
you may have to offer.
I did not see anything in the original posting by Brant Sears that
would lead
me to infer that he was trying to 'eavesdrop on other applications'
--- rather,
I inferred that he was trying to solve a problem similar to the one I
had had
to solve.
On Jan 23, 2004, at 5:17 PM, Brant Sears wrote:
Is there a way to get signaled for mouse moved events when my app is
not in
front? I've tried creating very high level, full screen clear
windows. For
example, at the shielding level, screen saver level, etc. However,
once I
click on the desktop, I stop getting mouse move events. I've tried
overriding methods like resignFirstResponder so that it always
returns NO,
and overriding resignMainWindow, resignKeyWindow so that they
doesn't do
anything (i.e. preventing the built in routines from being called).
Doing
this has had no effect on the behavior of the window with regards to
giving
me the mouse move events.
Do I need to inject my window into some other process (like some
system
process?). (If so, any idea how?) Or possible write the window into
some
kind of daemon that gets loaded at login time and then use IPC to
signal my
app when a mouse move happens. Again, if so, how does one go about
doing
that? Or would it be easier to try to get this information through
IOKit?
Best Wishes,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden | http://www.trilithon.com
|
===============================+============================
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.