From d279f2bc5eaee4c5870a1290306c9a2d66f115a3 Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Mon, 9 Nov 2020 23:56:08 +0100 Subject: [PATCH] fixed some stuff that was probably leftover from debugging --- keymapper/linux.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/keymapper/linux.py b/keymapper/linux.py index 6b81274a..8359e307 100644 --- a/keymapper/linux.py +++ b/keymapper/linux.py @@ -70,13 +70,18 @@ class KeycodeReader: If read is called without prior start_reading, no keycodes will be available. """ - logger.debug('Starting reading keycodes for %s', device) + paths = _devices[device]['paths'] + + logger.debug( + 'Starting reading keycodes for %s on %s', + device, + ', '.join(paths) + ) # Watch over each one of the potentially multiple devices per hardware - paths = _devices[device]['paths'] self.virtual_devices = [ evdev.InputDevice(path) - for path in paths[:1] + for path in paths ] def read(self): @@ -87,7 +92,7 @@ class KeycodeReader: event = virtual_device.read_one() if event is None: break - elif event.type == evdev.ecodes.EV_KEY and event.value == 1: + if event.type == evdev.ecodes.EV_KEY and event.value == 1: # value: 1 for down, 0 for up, 2 for hold. # this happens to report key codes that are 8 lower # than the ones reported by xev