How to click+hold+move with xdotool?

I've digged on StackExchange and on the YouTube but everywhere only how to clicks and moves. My question is how to click+hold e.g. some desktop icon and move it to different location with xdotool or highlight area with mouse arrow on the desktop which also require click+hold+move? Here is a bit related question xdotool script to perform mouse moves and clicks but still different. As well I've tried to find in manual here xdotool - command-line X11 automation tool

There is written:xdotool lets you programmatically (or manually) simulate keyboard input and mouse activity, move and resize windows

But I cannot find how. Can anyone help please?

According suggestions I tried following:

So here is following:

#!/bin/sh
for i in 'seq 1 200'
do xdotool mousemove 1519 599 mousedown sleep 2 xdotool mousemove 1519 750 mousedown sleep 2 xdotool mousemove 1600 750 mouseup sleep 2
done

and it is just move the mouse but doesn't highlighting area on the desktop which is should be is left button of the muse is pushed down.

1 Answer

"Dragging" should work by first have xdotool press the mouse button with the mousedown command. Then issue the mousemove commands, and issue mouseup when done dragging.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like