How to emulate a mouse click + drag?
Created by a
- Keywords:
- Last updated by:
- a
Emulating a mouse click + drag is quite straightforward. Clicking and dragging consists of three different events:
1. press mouse
2. move mouse
3. release mouse
The following code snippet generates exactly those input events:
import uinput
events = (
uinput.REL_X,
uinput.REL_Y,
uinput.
uinput.
)
device = uinput.
device.
device.
device.