10 lines
199 B
Python
10 lines
199 B
Python
#!/bin/python2.7
|
|
import evdev
|
|
device = evdev.InputDevice('/dev/input/event0')
|
|
print(device)
|
|
|
|
for event in device.read_loop():
|
|
if event.type == evdev.ecodes.EV_KEY:
|
|
print(evdev.categorize(event))
|
|
|