robot.py/testkeys.py

10 lines
199 B
Python
Raw Normal View History

2018-10-24 13:15:25 +02:00
#!/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))