diff --git a/remarkable_mouse/remarkable_mouse.py b/remarkable_mouse/remarkable_mouse.py index 415f0e6..50fcc5c 100755 --- a/remarkable_mouse/remarkable_mouse.py +++ b/remarkable_mouse/remarkable_mouse.py @@ -57,7 +57,7 @@ def fit(x, y, stylus_width, stylus_height, monitor, orientation): ) -def open_eventfile(args): +def open_eventfile(args, file='/dev/input/event0'): """ssh to reMarkable and open event0""" if args.key is not None: @@ -90,7 +90,7 @@ def open_eventfile(args): print("Connected to {}".format(args.address)) # Start reading events - _, stdout, _ = client.exec_command('cat /dev/input/event0') + _, stdout, _ = client.exec_command('cat ' + file) return stdout @@ -112,19 +112,19 @@ def read_tablet(args): # handle x direction if e_code == e_code_stylus_xpos: - log.debug(f'{e_value}') + log.debug(e_value) x = e_value new_x = True # handle y direction if e_code == e_code_stylus_ypos: - log.debug(f'\t{e_value}') + log.debug('\t{}'.format(e_value)) y = e_value new_y = True # handle draw if e_code == e_code_stylus_pressure: - log.debug(f'\t\t{e_value}') + log.debug('\t\t{}'.format(e_value)) if e_value > args.threshold: mouse.press(Button.left) else: diff --git a/remarkable_mouse/version.py b/remarkable_mouse/version.py index 08684d9..14e1e33 100644 --- a/remarkable_mouse/version.py +++ b/remarkable_mouse/version.py @@ -1 +1 @@ -__version__ = '3' +__version__ = '4'