Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Simulates key press/release, mouse move and mouse click events for OS-X.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 sample-app
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.textile
README.textile

Overview

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).

Example

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);

Build process

How to build libmkms

  1. mkdir lib/build
  2. cd lib/build
  3. cmake ..
  4. make

How to build the sample app

  1. mkdir sample-app/build
  2. cd sample-app/build
  3. cmake ..
  4. make

Documentation

  1. cd lib/build
  2. make mkms-docs
  3. open ../docs/doxygen/html/index.html
Something went wrong with that request. Please try again.