Question

I know that Robot class in java is used to generateInputevents such as mouseMove,press and release and also keyevents ,i know only the functionality i.e if i call mouseMove(x,y) mousepointer will move to the (x,y) position.I don't know ,Actually what happens inside i.e what are the steps take by JVM to interact with os to move the mouse pointer and other events?

Was it helpful?

Solution

The nice thing about the Java library is that a lot of it is opensource. A quick glance through it shows that on Unix-ish platforms it creates a XToolkit and then there's a lot of interfacing with the X11 library to send keyboard and mouse events.

In particular, all of the events are eventually dispatched to sun.awt.X11.XRobotPeer, who then dispatches them to awt_Robot.c who then calls various X11 functions to produce particular events.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top