Elektrine lite

← Feed

@basic_user@lemmy.world

Automating keyboard+mouse in cachyos kde using wayland

2026-07-11 08:33 UTC

Hi, using Cachyos kde I’ve been making a python script that will move the mouse to a position -> click -> move mouse back to the original position. I can get this working with x11, but it fails with wayland. Do you know any way to programatically move the mouse and click that works with wayland? Thanks

Replies (5)

  • @ISOmorph@feddit.org 2026-07-11 08:53

    ydotool does specifically do what you need

    Open ##3735887

  • @regdog@lemmy.world 2026-07-11 09:39

    Does it need to be fully automatic, or does semi-automatic work for you? I am using input remapper to automate a few functions of my input devices. It only used it on my Plasma desktop, but it should work in all desktop environments.

    Open ##3736586

  • @Tetsuo@jlai.lu 2026-07-11 12:55

    There is a non-zero chance this post is a cheater asking on how to build a aimbot…

    Open ##3739845

  • @edinbruh@feddit.it 2026-07-11 18:36

    The proper way to programmatically move a cursor on Linux is using uinput. Anything you were doing that worked in xorg and not in wayland was more akin to a weird remnant from the 80s than to an actual solution. However, there will likely be full featured applications that already do whatever you were trying to do.

    Open ##3744983

  • @Zamundaaa@discuss.tchncs.de 2026-07-12 12:29

    xdotool should work the same in the Wayland session, assuming you give X11 apps the permission to emulate input. What about it isn’t working?

    Open ##3761510