Giter Site home page Giter Site logo

property404 / xinputsimulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pythoneer/xinputsimulator

0.0 3.0 0.0 110 KB

Cross (X) Platform (*nix/macOS/Windows) Simulator for input devices to simulate mouse move/click/scroll or keyboard keystrokes.

CMake 3.21% QMake 1.86% C++ 94.93%

xinputsimulator's Introduction

XInputSimulator

Cross (X) Platform (Linux/macOS/Win) Simulator for input devices to simulate mouse moves/clicks/scrolls or keyboard keystrokes.

Build Status

This program is published under the terms of the LGPL (http://www.gnu.org/licenses/) ####How to use For a detailed example see main.cpp

  XInputSimulator &sim = XInputSimulator::getInstance();

  sim.mouseMoveTo(500,400);                           //set mouse to screen cords 500x400
  sim.mouseMoveRelative(400, -100);                   //move frome there 400px in x to the right and -100px in y upwards
  sim.mouseDown(XInputSimulator::LEFT_MOUSE_BUTTON);  //press left mouse and hold
  sim.mouseMoveRelative(0, 300);                      //drag/mark with pressed mousebutton 300px down
  sim.mouseUp(XInputSimulator::LEFT_MOUSE_BUTTON);    //release the mousebutton press

building for Linux use -lX11 -lXtst
building for macOS use -framework ApplicationServices Carbon CoreFoundation
building for Win use User32.lib

for cmake there is a CMakeLists.txt file -simply type (for all platforms):

>$ mkdir build
>$ cd build
>$ cmake ../src/
>$ cmake --build .

for xcode you can generate a project by

>$ mkdir build
>$ cd build
>$ cmake -G Xcode ../src/

####Status early Alpha 2013-07-16: Linux, macOS and Win part with following functions

mouseMoveTo  
mouseMoveRelative  
mouseDown  
mouseUp  
mouseClick  
mouseScrollY  //up and down
mouseScrollX  //left an right

be aware that some glitches might appear and the interface might be changing every minute due to the early state of development. There is not much testing going on apart from the main.cpp. Feel free to file bugreports, wishes or patches :)

xinputsimulator's People

Contributors

graschke avatar property404 avatar pythoneer avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.