XInputSimulator/README.md

34 lines
1.2 KiB
Markdown
Raw Normal View History

2013-07-14 10:45:01 +02:00
XInputSimulator
===============
2013-07-14 17:15:14 +02:00
Cross (X) Plattform (Linux/Mac/Win) Simulator for input devices to simulate mouse moves/clicks/scrolls or keyboard keystrokes.
This program is published under the terms of the LGPL (http://www.gnu.org/licenses/)
2013-07-14 14:40:09 +02:00
####How to use
2013-07-14 14:35:32 +02:00
For a detailed example see main.cpp
2013-07-14 14:40:09 +02:00
```cpp
2013-07-14 17:16:24 +02:00
XInputSimulator &sim = XInputSimulator::getInstance();
2013-07-14 17:06:35 +02:00
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(1); //press left mouse and hold
sim.mouseMoveRelative(0, 300); //drag/mark with pressed mousebutton 300px down
sim.mouseUp(1); //release the mousebutton press
2013-07-14 14:40:09 +02:00
```
2013-07-16 11:00:43 +02:00
2013-07-16 13:49:04 +02:00
building for Linux use -lX11 | include X11/Xlib.h X11/Xutil.h
building for Mac use -framework ApplicationServices | include ApplicationServices/ApplicationServices.h
building for Win use User32.lib | include Windows.h
2013-07-14 17:11:48 +02:00
####Status
2013-07-16 13:47:59 +02:00
2013-07-16: Linux, Mac and Win part with following functions
2013-07-14 17:11:48 +02:00
```cpp
mouseMoveTo
mouseMoveRelative
mouseDown
mouseUp
mouseClick
2013-07-14 17:58:44 +02:00
mouseScrollY //up and down
mouseScrollX //left an right
2013-07-14 17:11:48 +02:00
```