revert accidentially changes
This commit is contained in:
parent
ea17a881a1
commit
3308de3e6f
@ -20,22 +20,25 @@ for fd in iDevices:
|
|||||||
# dev.info.bustype,
|
# dev.info.bustype,
|
||||||
# '/dev/uinput'
|
# '/dev/uinput'
|
||||||
)
|
)
|
||||||
|
dev.grab()
|
||||||
|
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
while i < 1000:
|
while i < 100:
|
||||||
r, w, x = select(iDevices, [], [])
|
r, w, x = select(iDevices, [], [])
|
||||||
if r != []:
|
if r != []:
|
||||||
i += 1
|
i += 1
|
||||||
for fd in r:
|
for fd in r:
|
||||||
for event in iDevices[fd].read():
|
for event in iDevices[fd].read():
|
||||||
if event.code != 30: # a
|
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:
|
else:
|
||||||
print('this key is consumed')
|
print('this key is consumed')
|
||||||
break
|
|
||||||
break
|
|
||||||
|
|
||||||
for fd in iDevices:
|
for fd in iDevices:
|
||||||
|
iDevices[fd].ungrab()
|
||||||
iDevices[fd].close()
|
iDevices[fd].close()
|
||||||
uDevices[fd].close()
|
uDevices[fd].close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user