revert accidentially changes

This commit is contained in:
chrys87 2016-09-13 09:47:27 +02:00 committed by GitHub
parent ea17a881a1
commit 3308de3e6f

View File

@ -20,22 +20,25 @@ for fd in iDevices:
# dev.info.bustype,
# '/dev/uinput'
)
dev.grab()
i = 0
while i < 1000:
while i < 100:
r, w, x = select(iDevices, [], [])
if r != []:
i += 1
for fd in r:
for event in iDevices[fd].read():
if event.code != 30: # a
print('Devicename:'+ iDevices[fd].name + ' Devicepath:' + iDevices[fd].fn + ' Events:' + str(iDevices[fd].active_keys(verbose=True)) + ' Value:' + str(event.value))
uDevices[fd].write_event(event)
uDevices[fd].syn()
#print('Devicename:'+ devices[fd].name + ' Devicepath:' + devices[fd].fn + ' Events:' + str(devices[fd].active_keys(verbose=True)) + ' Value:' + str(event.value))
else:
print('this key is consumed')
break
break
for fd in iDevices:
iDevices[fd].ungrab()
iDevices[fd].close()
uDevices[fd].close()