From 704943ba624723883bdecf9342d45594cac905f3 Mon Sep 17 00:00:00 2001 From: Surferlul Date: Fri, 22 Jul 2022 23:57:55 +0200 Subject: [PATCH] test --- remote_evdev/stream/guest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/remote_evdev/stream/guest.py b/remote_evdev/stream/guest.py index 7696169..fe88f43 100644 --- a/remote_evdev/stream/guest.py +++ b/remote_evdev/stream/guest.py @@ -26,10 +26,12 @@ def handle_client(s: socket): for fd, device in receive_devices(s): d[fd] = device + active_keys = {} while True: fd, event = receive_event(s) - if event[1] in [29, 97, 157]: - print(event) + if event[0] == 1: + active_keys[event[1]] = event[2] + print(i for i in active_keys if active_keys[i]) if fd == 4294967295: s.close() for fd in d: