From 4eddc80cd0fa871143f4f2279fc8135c2e198e9c Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 23 Feb 2019 14:09:38 +1100 Subject: [PATCH] relay: report only missing keys --- relay.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/relay.py b/relay.py index e930cd9..0e29ca0 100755 --- a/relay.py +++ b/relay.py @@ -198,7 +198,6 @@ if __name__ == '__main__': continue data = evdev.categorize(event) - print("Got key", data.scancode) modifier = modifiers.get(data.scancode, None) if modifier: @@ -209,18 +208,16 @@ if __name__ == '__main__': else: code = scan_to_hid.get(data.scancode, None) if code is None: - print("Ignoring unknown key") + print("Ignoring unknown key", data) continue if data.keystate == data.key_down: if len(keys_down) >= 6: print("Ignoring key due to rollover") continue - print("Adding key") keys_down.add(code) if data.keystate == data.key_up: - print("Removing key") keys_down.remove(code) # Build the packet @@ -229,5 +226,4 @@ if __name__ == '__main__': assert(len(packet) == 8) - print("Sending", packet) os.write(dst, bytes(packet))