improve input handling

This commit is contained in:
chrys
2016-09-25 16:09:17 +02:00
parent 6bf4098074
commit 204e9423ff
3 changed files with 14 additions and 5 deletions

View File

@ -37,7 +37,6 @@ class driver():
def writeEventBuffer(self):
for iDevice, uDevice, event in self.env['input']['eventBuffer']:
self.writeUInput(uDevice, event)
self.clearEventBuffer()
def clearEventBuffer(self):
del self.env['input']['eventBuffer'][:]
@ -53,7 +52,8 @@ class driver():
# 1 Keys
# we try to filter out mices and other stuff here
self.iDevices = map(evdev.InputDevice, (evdev.list_devices()))
self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
#self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}
self.iDevices = {dev.fd: dev for dev in self.iDevices if 1 in dev.capabilities()}
self.ledDevices = map(evdev.InputDevice, (evdev.list_devices()))
self.ledDevices = {dev.fd: dev for dev in self.ledDevices if 1 in dev.capabilities() and 17 in dev.capabilities() and not 3 in dev.capabilities() and not 2 in dev.capabilities()}