Commit a739cfb0 authored by anthraxx's avatar anthraxx
Browse files

fix evdev read with wrong early return instead continue to read

parent 62781238
......@@ -53,13 +53,14 @@ class EvdevScanner(object):
try:
for event in self.device.read():
if event.type != ecodes.EV_KEY or event.value != 1:
return None
continue
scanned_input = self.scancodes.get(event.code)
if scanned_input == "\n":
line = self.buffer
self.buffer = ""
return line
self.buffer += scanned_input or ""
return None
except BlockingIOError:
return None
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment