Connecting Tech Pros Worldwide Forums | Help | Site Map

capture Mouse Movement on Linux screen

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

I wonder how I could use C/C++ to capture movement of a mouse on Linux screen (not just on a particular webpage user is on).

Thanks in advance
L

Familiar Sight
 
Join Date: Apr 2007
Posts: 191
#2: May 7 '09

re: capture Mouse Movement on Linux screen


What exactly are you after?

Do you want to make an application with a graphical interface of some sort that tracks mouse movement? If so there are numerous libraries to help - GTK and QT come to mind.

If you just want to play you can use a utility called 'xev' to show you mouse events. The command 'man xev' should get you started (or internet search).

If you need something even more extravagant you can write a driver to plug into X (maybe you have a touchscreen or something)?

Maybe you can explain more about what you want to do with the mouse events.
Newbie
 
Join Date: Oct 2008
Posts: 13
#3: May 7 '09

re: capture Mouse Movement on Linux screen


hey ,

i'm re-evaluating and thinking about may be cutting off this part to later phase or to replace it with something else because it is part of a not-workable idea... i wanted to see whether mouse events (other than clicking links or something for some other functions) have anything related to a person psychologically. but writing a new driver won't do since i want to apply it online .. thanks for suggestion.
Reply