From 823bad796c88e58aecf3c504a7134d1b9ec9cf54 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Thu, 21 Nov 2019 23:44:49 +1100 Subject: [PATCH] Correct typo causing movement along one axis only to not be detected --- forward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forward.py b/forward.py index 3f78db6..5ffe1d0 100755 --- a/forward.py +++ b/forward.py @@ -44,7 +44,7 @@ async def mousemove(): result = {x[:x.index(':')]: int(x[x.index(':')+1:]) for x in stdout.decode('utf-8').strip().split(' ')} dx, dy = result['x'] - MOUSEHOLD_X, result['y'] - MOUSEHOLD_Y - if dx != 0 and dy != 0: + if dx != 0 or dy != 0: print(dx, dy, file=sys.stderr) print('DISPLAY=:0 xdotool mousemove_relative -- {} {}'.format(dx, dy))