VGamepad PC
The Windows app for the virtual game controller.
Loading...
Searching...
No Matches
mouseSim.cpp File Reference
#include "mouseSim.hpp"
Include dependency graph for mouseSim.cpp:

Functions

void moveMouseToPosition (int x, int y)
 Move the mouse to the specified coordinates.
 
void moveMouseByOffset (int x, int y)
 Move the mouse by the specified offset.
 
void leftClick ()
 Simulate a left click.
 
void singleClick ()
 Simulate a single left click.
 
void doubleClick ()
 
void rightClick ()
 
void middleClick ()
 
void scrollUp ()
 
void scrollDown ()
 

Function Documentation

◆ doubleClick()

void doubleClick ( )

◆ leftClick()

void leftClick ( )

Simulate a left click.

Note
Repeated calls to this function may result in a double click. Use singleClick() if you want to avoid this.
See also
singleClick()

◆ middleClick()

void middleClick ( )

◆ moveMouseByOffset()

void moveMouseByOffset ( int x,
int y )

Move the mouse by the specified offset.

Parameters
xfrom 0 to screen width
yfrom 0 to screen height

◆ moveMouseToPosition()

void moveMouseToPosition ( int x,
int y )

Move the mouse to the specified coordinates.

Parameters
xfrom 0 to screen width
yfrom 0 to screen height

◆ rightClick()

void rightClick ( )

◆ scrollDown()

void scrollDown ( )

◆ scrollUp()

void scrollUp ( )

◆ singleClick()

void singleClick ( )

Simulate a single left click.

Note
This function will sleep for the double click time.