Skip to content

Commit

Permalink
Add mouse move on specific coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
bkbilly committed Apr 27, 2024
1 parent 397d12c commit 78d312d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lnxlink/modules/mouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ def start_control(self, topic, data):
os.environ["DISPLAY"] = self.lnxlink.display
logger.info("Initializing empty DISPLAY environment variable")

if topic[1] == "mouse_left":
if topic[1] == "mouse_move":
coords = data.replace(" ", "").split(",")
syscommand(f"xdotool mousemove {coords[0]} {coords[1]}")
elif topic[1] == "mouse_left":
self._move([-1, 0])
elif topic[1] == "mouse_right":
self._move([1, 0])
Expand Down

0 comments on commit 78d312d

Please sign in to comment.