filter out uinput devices

This commit is contained in:
chrys 2018-05-17 00:16:47 +02:00
parent 09e3969531
commit 6c7278350f

View File

@ -172,6 +172,8 @@ class driver(inputDriver):
currDevice = evdev.InputDevice(deviceFile) currDevice = evdev.InputDevice(deviceFile)
if currDevice.name.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']: if currDevice.name.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']:
continue continue
if currDevice.phys.upper() in ['','SPEAKUP','PY-EVDEV-UINPUT']:
continue
if 'BRLTTY' in currDevice.name.upper(): if 'BRLTTY' in currDevice.name.upper():
continue continue
cap = currDevice.capabilities() cap = currDevice.capabilities()
@ -286,6 +288,7 @@ class driver(inputDriver):
self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: init Uinput not possible: ' + str(e),debug.debugLevel.ERROR) self.env['runtime']['debug'].writeDebugOut('InputDriver evdev: init Uinput not possible: ' + str(e),debug.debugLevel.ERROR)
return return
def addDevice(self, newDevice): def addDevice(self, newDevice):
print(newDevice.fd,newDevice)
self.iDevices[newDevice.fd] = newDevice self.iDevices[newDevice.fd] = newDevice
self.gDevices[newDevice.fd] = False self.gDevices[newDevice.fd] = False
self.createUInputDev(newDevice.fd) self.createUInputDev(newDevice.fd)