Commit 5a8ad457 authored by anthraxx's avatar anthraxx
Browse files

evdev non-blocking read_one mode

parent 3c47ff9b
......@@ -50,7 +50,9 @@ class EvdevScanner(object):
self.device.grab()
def read(self):
for event in self.device.read_loop():
for event in self.device.read_one():
if not event:
return None
if event.type != ecodes.EV_KEY or event.value != 1:
return None
scanned_input = self.scancodes.get(event.code)
......
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