I simulate click and move actions using XQueryPointer
and XWarpPointer
. I want to simulate drag action but I can't find a way to do it. How can I do on linux machine?
使用xtest扩展-使用XTestFakeButtonEvent
/ XTestFakeMotionEvent
模拟初始的鼠标下移+鼠标移动事件+鼠标向上
if you are not restricted to c++ you can also use xdotool. It's command line tool. For dragging you can send buttondown, move, buttonup events.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.