more strict keyboard filter

This commit is contained in:
chrys 2018-05-13 21:27:29 +02:00
parent ccc34ef778
commit d0bdaea86e

View File

@ -134,7 +134,6 @@ class driver(inputDriver):
return return
uDevice.write_event(event) uDevice.write_event(event)
uDevice.syn() uDevice.syn()
time.sleep(0.00001)
def updateInputDevices(self, force = False, init = False): def updateInputDevices(self, force = False, init = False):
if init: if init:
@ -173,8 +172,8 @@ class driver(inputDriver):
if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10: if 116 in cap[eventType.EV_KEY] and len(cap[eventType.EV_KEY]) < 10:
self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO) self.env['runtime']['debug'].writeDebugOut('Device Skipped (has 116):' + currDevice.name,debug.debugLevel.INFO)
continue continue
if len(cap[eventType.EV_KEY]) < 30: if len(cap[eventType.EV_KEY]) < 60:
self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 30 keys):' + currDevice.name,debug.debugLevel.INFO) self.env['runtime']['debug'].writeDebugOut('Device Skipped (< 60 keys):' + currDevice.name,debug.debugLevel.INFO)
continue continue
if mode == 'ALL': if mode == 'ALL':
self.iDevices[currDevice.fd] = currDevice self.iDevices[currDevice.fd] = currDevice