Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An Event Listener

Status
Not open for further replies.

javabeanx

Programmer
Apr 29, 2002
10
IN
i am trying to create a backround process which will record the events(keyboard and mouse) for any application running from the terminal within a span of time.If it is a keyboard event it must tell me what key is pressed and if it is a mouse event i must be able to get the button pressed and the coordinates related to the screen.i am particularly interested in java applications.i am not supposed to disturb the process running in the foreground.my background process must be able to store all the events in a file. pls tell me the necessary apis,site and the good books to be referred.
thank you.

nandini
 
If you wanna get events,you gonna have to use the Xlib, it throws events for about everything you want. I don't where how java fits in. I'd use C++ :)
To start another process, you should use fork() (just look in google for xlib+tutorial+fork)
then you should ask X to throw keyboard and mouse events with
XSelectInput (dis, win, ExposureMask | KeyPressMask | ButtonPressMask);
just check those links:


Greetz,

The Muppeteer.

themuppeteer@hotmail.com

Don't eat yellow snow...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top