Connecting Tech Pros Worldwide Forums | Help | Site Map

Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen

Newbie
 
Join Date: Oct 2008
Posts: 13
#1: May 6 '09
Hello,

I wonder whether how MouseListener can be used to capture a mouse movement on LiNux screen .


Thanks in Advance
L

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


You have posted this question in four forums now three of them for different languages. Do you want to do this using all those languages or are you trying to spam the forums with the same question?
Newbie
 
Join Date: Oct 2008
Posts: 13
#3: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


hey r035198x,

no, I have no such intention. T T in fact , i'm still searching for the best language i should use to do this task since i really have no knowledge on this. And I'm not sure which forum I should post this to.

L.
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


Forget about C# then. Why do you want to track the mouse movements?
Newbie
 
Join Date: Oct 2008
Posts: 13
#5: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


I need to keep the data on mouse to analyze..

Could u reply via an email instead?
Here's the address<Removed>
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#6: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


What do you need this data for? Analyze for what?
Newbie
 
Join Date: Oct 2008
Posts: 13
#7: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


umm I need to see whether a mouse movement and action (mouse event) has anything to do with a person psychologically..

actually i need one on mac os as well

so what i need is just a log of mouse event or something like that.. just a tracker .. that's all

are there different ways of getting mouse event for different purposes?
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,393
#8: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


It sounds like what you are trying to do would require you to write a new mouse driver. You should search the internet on how to write or replace a new driver and see if it is something that you would want to do.
Newbie
 
Join Date: Oct 2008
Posts: 13
#9: May 6 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


Thanks RedSon!
I'll search for that...

but, I'm still opened for more suggestion..
I wonder about pros and cons on different methods.. or whether any other existing methods exist.. do u have any idea?

Thanks
L
RedSon's Avatar
Site Moderator
 
Join Date: Jan 2007
Location: America
Posts: 3,393
#10: May 8 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


The only method that I can think of is writing a new mouse driver. You can tell where the mouse is in your own window in your application but when you application loses focus you don't get that information anymore. I don't know how it would work for other OSs
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#11: May 8 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


Since this thread is also posted in the Java forum: have a look at the Robot class.

kind regards,

Jos
Newbie
 
Join Date: Oct 2008
Posts: 13
#12: May 11 '09

re: Hey , I wonder how I could use C/C++ to capture movement of a mouse on Linux screen


thanks for advices ..
somehow, i will move to other things and come back to this later though.. for now

L
Reply


Similar Java bytes