Re: How to get mouse moved events?
Re: How to get mouse moved events?
- Subject: Re: How to get mouse moved events?
- From: Henry McGilton <email@hidden>
- Date: Fri, 23 Jan 2004 22:52:01 -0800
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.