Update evdevDriver.py
This commit is contained in:
parent
8e6d09df3d
commit
e501f7293f
@ -111,7 +111,11 @@ class driver():
|
|||||||
try:
|
try:
|
||||||
if deviceFile in iDevicesFiles:
|
if deviceFile in iDevicesFiles:
|
||||||
continue
|
continue
|
||||||
|
try:
|
||||||
open(deviceFile)
|
open(deviceFile)
|
||||||
|
except:
|
||||||
|
print("Not readable Inputdevice : " + deviceFile +' ' + str(e))
|
||||||
|
continue
|
||||||
# 3 pos absolute
|
# 3 pos absolute
|
||||||
# 2 pos relative
|
# 2 pos relative
|
||||||
# 1 Keys
|
# 1 Keys
|
||||||
@ -121,9 +125,12 @@ class driver():
|
|||||||
cap = currDevice.capabilities()
|
cap = currDevice.capabilities()
|
||||||
if mode in ['ALL','NOMICE']:
|
if mode in ['ALL','NOMICE']:
|
||||||
if 1 in cap:
|
if 1 in cap:
|
||||||
if 116 in cap[1] and len(cap[1]) < 5:
|
if 116 in cap[1] and len(cap[1]) < 10:
|
||||||
print('power')
|
print('power')
|
||||||
continue
|
continue
|
||||||
|
if len(cap[1]) < 30:
|
||||||
|
print('Not A useful keyboared')
|
||||||
|
continue
|
||||||
if mode == 'ALL':
|
if mode == 'ALL':
|
||||||
self.iDevices[currDevice.fd] = currDevice
|
self.iDevices[currDevice.fd] = currDevice
|
||||||
self.grabDevice(currDevice.fd)
|
self.grabDevice(currDevice.fd)
|
||||||
|
Loading…
Reference in New Issue
Block a user