diff --git a/forward.py b/forward.py index 5ffe1d0..1d259f4 100755 --- a/forward.py +++ b/forward.py @@ -98,7 +98,8 @@ async def keyboardinp(): sys.exit(0) return - print('DISPLAY=:0 xdotool keydown {}'.format(button)) + # Add leading 0 to force interpretation as key code + print('DISPLAY=:0 xdotool keydown 0{}'.format(button)) elif line.startswith('key release'): print(line, file=sys.stderr) button = line.split()[-1] @@ -106,7 +107,7 @@ async def keyboardinp(): if button == '37': is_ctrl = False - print('DISPLAY=:0 xdotool keyup {}'.format(button)) + print('DISPLAY=:0 xdotool keyup 0{}'.format(button)) async def main(): tasks = []