The MacKeyboardMouseSimulator simulates key press/release, mouse move and mouse click events with the help of mac OS-X Quartz Event Service.
The simulator uses the C API for event taps to alter the stream of low-level user input events.
Some parts are taken from libsikuli (robot.cpp).
mkms::MacKeyboardMouseSimulator simulator; std::cout << "Simulating mouse move" << std::endl; simulator.mouseMove(100, 100); std::cout << "Simulating single mouse click" << std::endl; simulator.mouseSingleClick(1); std::cout << "Simulating key press 'a' " << std::endl; simulator.pressOnce(VK_A);
- mkdir lib/build
- cd lib/build
- cmake ..
- make
- mkdir sample-app/build
- cd sample-app/build
- cmake ..
- make
- cd lib/build
- make mkms-docs
- open ../docs/doxygen/html/index.html