I am trying to find the native implementations of Java Robot functions. I found the Windows implementation here. Where can I find the mac and linux versions. I'm mainly trying to find out what it's doing to see how I can implement this functionality myself in C++.
The Robot class in the Java AWT package is used to generate native system input events for the purposes of test automation, self-running demos, and other applications where control of the mouse and keyboard is needed. The primary purpose of Robot is to facilitate automated testing of Java platform implementations.
Robot class is present in the AWT package of JDK. Step 1: MouseMove() method takes the x and y coordinates as its parameters robot.
VK_META and META_MASK are defined in KeyEvent and InputEvent classes. They both define the META key as a standalone key pressed and as a modifier used pressing another key respectively. The META key is a key used in old keyboards and now can be emulated using the Windows Key.
Robot Class in Selenium is used to enable automated testing for implementations of Java platform. It generates input events in native systems for test automation, self-running demos and other applications where users need control over mouse and keyboard.
Okay so I did some digging around and found what I was looking for. These may not be the latest versions but the metadata is there.
The source code of this class seems having no any native methods, probably calls are delegated somewhere else. In any case, OpenJDK seems a proper place to search as this is a complete project and not just part that is written in Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With