diff --git a/play zone/consumeEvents.py b/play zone/consumeEvents.py index 573f8930..c2e110bf 100755 --- a/play zone/consumeEvents.py +++ b/play zone/consumeEvents.py @@ -7,12 +7,6 @@ import time iDevices = map(evdev.InputDevice, (evdev.list_devices())) iDevices = {dev.fd: dev for dev in iDevices if evdev.events.EV_KEY in dev.capabilities()} -for fd in iDevices: - dev = iDevices[fd] - print(dev.name,dev.leds()) - -return - uDevices = {} for fd in iDevices: dev = iDevices[fd] diff --git a/play zone/listDevices.py b/play zone/listDevices.py new file mode 100755 index 00000000..18f7bcd9 --- /dev/null +++ b/play zone/listDevices.py @@ -0,0 +1,13 @@ +#!/bin/python +import evdev +from evdev import InputDevice, UInput +from select import select +import time + +iDevices = map(evdev.InputDevice, (evdev.list_devices())) +iDevices = {dev.fd: dev for dev in iDevices} + +for fd in iDevices: + dev = iDevices[fd] + cap = dev.capabilities() + print(dev.name,dev.leds(),'has keys:'+str(evdev.events.EV_KEY in cap),'is mouse:'+str(((evdev.events.EV_REL in cap) or (evdev.events.EV_ABS in cap))))