ydotool icon indicating copy to clipboard operation
ydotool copied to clipboard

`ydotool mousemove --absolute` moves Mouse to the top of the Screen

Open JakobDev opened this issue 1 year ago • 14 comments

ydotool mousemove --absolute just moves the Mouse to the upper left Corner of the Screen, no matter which coordinates are entered.

JakobDev avatar Jul 27 '24 23:07 JakobDev

any progress on this matter? i also have this issue, so i need to move the mouse to the top left corner of the screen and then use the relative function to move it to the desired location it is really annoying

roadbloack avatar Aug 11 '24 11:08 roadbloack

did you see this comment in the help? "You need to disable mouse speed acceleration for correct absolute movement." does it make a difference?

jonas73x avatar Aug 15 '24 08:08 jonas73x

yes pointer acceleration is turned off in the settings

roadbloack avatar Aug 18 '24 04:08 roadbloack

Disabling pointer acceleration helped. Thanks jonas! I've read that I needed to do that but it slipped my mind still.

image

Edit: Oh, but it seems to be inconsistent at it though. Sometimes it will go to specified location and sometimes it will go to the corner...

Edit2: I think I've figured this out? When I try multiple relative mousemove commands at once to achieve the same effect as when using 'absolute' argument I'm experiencing a very similar issue where the commands work randomly. When trying them one by one repeatedly using separate shortcuts for each command they worked flawlessly. So depending on how this 'absolute' argument is handled in the backend a small pause between the actions may do the trick.

Edit3: Something like ydotool mousemove -x -3000 -y -3000 && sleep 0.05 && ydotool mousemove -x 1360 -y 425 doesn't cause me problems.

M4rtineski avatar Dec 20 '24 22:12 M4rtineski

I don't have an option to turn off mouse accel in Debian KDE, I only get "Flat" and "Adaptive" in Mouse settings.

A workaround which works is to set absolute to 0,0 to move cursor to 0,0 and then use relative to achieve the desired absolute position. Works for my use case.

cen1 avatar Jan 03 '25 18:01 cen1

I have the same problem. I am using KDE with Fedora 41. I turned off mouse acceleration but it didn't help. I am using the same workaround as mashrit.

davidlevner avatar Jan 20 '25 22:01 davidlevner

@davidlevner I was so annoyed by this issue, I looked for an alternative and found this, you can use touch for absolute movement and mouse for relative

roadbloack avatar Jan 21 '25 02:01 roadbloack

Same issue but disabling pointer accelration didn't fixed. In my case I have a multi monitor system and doesn't work very good

Mte90 avatar Jan 24 '25 10:01 Mte90

I'm having the same problem

  • Fedora 41
  • KDE Plasma 6.3.1
  • KWin (Wayland)
  • 2 monitors

Turning off mouse accelleration did not fix it

garbofrogman avatar Feb 28 '25 15:02 garbofrogman

Same

FC41 KDE Plasma 6.3.3 Kwin 1 Monitor x 2 Workspaces 0ff mouse acceleration dont fix.

Thanks!

CBx86 avatar Mar 03 '25 15:03 CBx86

Hey guys, some news? Any alternative software?

Thanks!

CBx86 avatar Apr 05 '25 18:04 CBx86

The easiest thing to do is just do ydotool mousemove -x -9999999 -y -9999999 a couple times to force the mouse to 0,0. Then you can have your next move be an absolute location via just using the relative command (that is relative from 0,0 is an absolute position).

Renari avatar Apr 05 '25 21:04 Renari

ydotool already does this internally, but it seems move to the negative value only once isn't enough.

ClassicOldSong avatar Apr 05 '25 21:04 ClassicOldSong

Yeah I noticed this the first time moving to a negative position takes me to around 100,100 however a 2nd call correctly gets you to 0,0.

Renari avatar Apr 06 '25 07:04 Renari

for reference:

❯ sudo -b ydotoold --socket-path="/tmp/.ydotool_socket" --socket-own="$(id -u):$(id -g)"
Socket path: /tmp/.ydotool_socket
Socket permission: 0600
Socket ownership: UID=1000, GID=1000
READY
WARNING: running xinput against an Xwayland server. See the xinput man page for details.
unable to find device pointer:ydotoold virtual device
❯ YDOTOOL_SOCKET="/tmp/.ydotool_socket" ydotool mousemove --absolute -x 100 -y 100
❯ kdotool getmouselocation
x:39 y:31 screen:3 window:{846c200e-866f-4b7f-b423-f4f903135311}
❯ YDOTOOL_SOCKET="/tmp/.ydotool_socket" ydotool mousemove --absolute -x 100 -y 100
❯ kdotool getmouselocation
x:0 y:0 screen:3 window:{e8d01825-e1e3-4e02-93c2-990e76207b4c}

This is on: KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0

Renari avatar Nov 29 '25 14:11 Renari