|
|
@ -85,6 +85,7 @@ def open_eventfile(args): |
|
|
|
pkey=pkey, |
|
|
|
pkey=pkey, |
|
|
|
look_for_keys=False |
|
|
|
look_for_keys=False |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
print("Connected to {}".format(args.address)) |
|
|
|
|
|
|
|
|
|
|
|
# Start reading events |
|
|
|
# Start reading events |
|
|
|
_, stdout, _ = client.exec_command('cat /dev/input/event0') |
|
|
|
_, stdout, _ = client.exec_command('cat /dev/input/event0') |
|
|
@ -150,6 +151,7 @@ def read_tablet(args): |
|
|
|
|
|
|
|
|
|
|
|
def main(): |
|
|
|
def main(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try: |
|
|
|
parser = argparse.ArgumentParser(description="use reMarkable tablet as a mouse input") |
|
|
|
parser = argparse.ArgumentParser(description="use reMarkable tablet as a mouse input") |
|
|
|
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right']) |
|
|
|
parser.add_argument('--orientation', default='left', choices=['vertical', 'left', 'right']) |
|
|
|
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use") |
|
|
|
parser.add_argument('--monitor', default=0, type=int, metavar='NUM', help="monitor to use") |
|
|
@ -166,10 +168,9 @@ def main(): |
|
|
|
log.setLevel(logging.DEBUG) |
|
|
|
log.setLevel(logging.DEBUG) |
|
|
|
|
|
|
|
|
|
|
|
read_tablet(args) |
|
|
|
read_tablet(args) |
|
|
|
|
|
|
|
except KeyboardInterrupt: |
|
|
|
|
|
|
|
pass |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
if __name__ == '__main__': |
|
|
|
try: |
|
|
|
|
|
|
|
main() |
|
|
|
main() |
|
|
|
except KeyboardInterrupt: |
|
|
|
|
|
|
|
pass |
|
|
|
|
|
|
|