Browse Source

Read multiple devices

master
Mendel Greenberg 4 years ago committed by GitHub
parent
commit
997b6336aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      remarkable_mouse/remarkable_mouse.py

9
remarkable_mouse/remarkable_mouse.py

@ -69,11 +69,16 @@ def open_remote_device(args, file='/dev/input/event0'): @@ -69,11 +69,16 @@ def open_remote_device(args, file='/dev/input/event0'):
paramiko.agent.AgentRequestHandler(session)
# Start reading events
_, stdout, _ = client.exec_command('cat ' + file)
_, pen, _ = client.exec_command('cat ' + file)
_, mt, _ = client.exec_command('cat /dev/input/event1')
_, btn, _ = client.exec_command('cat /dev/input/event2')
pen.channel.setblocking(0)
mt.channel.setblocking(0)
btn.channel.setblocking(0)
print("connected to", args.address)
return stdout
return pen, mt, btn
def main():

Loading…
Cancel
Save