Update inputManager.py
This commit is contained in:
parent
a251e5c466
commit
77c8b27be2
@ -28,14 +28,14 @@ class inputManager():
|
|||||||
if environment['runtime']['inputDriver']:
|
if environment['runtime']['inputDriver']:
|
||||||
environment['runtime']['inputDriver'].shutdown(environment)
|
environment['runtime']['inputDriver'].shutdown(environment)
|
||||||
|
|
||||||
def proceedInputEvent(self, environment):
|
def getInputEvent(self, environment):
|
||||||
timeout = True
|
eventReceived = False
|
||||||
mEvent = environment['runtime']['inputDriver'].getInput(environment)
|
mEvent = environment['runtime']['inputDriver'].getInput(environment)
|
||||||
mEvent['EventName'] = self.convertEventName(mEvent['EventName'])
|
mEvent['EventName'] = self.convertEventName(mEvent['EventName'])
|
||||||
if mEvent:
|
if mEvent:
|
||||||
if mEvent['EventValue'] == 0:
|
if mEvent['EventValue'] == 0:
|
||||||
return True
|
return False
|
||||||
timeout = False
|
eventReceived = True
|
||||||
if mEvent['EventState'] == 0:
|
if mEvent['EventState'] == 0:
|
||||||
if mEvent['EventName'] in environment['input']['currInput']:
|
if mEvent['EventName'] in environment['input']['currInput']:
|
||||||
environment['input']['currInput'].remove(mEvent['EventName'])
|
environment['input']['currInput'].remove(mEvent['EventName'])
|
||||||
@ -56,7 +56,7 @@ class inputManager():
|
|||||||
environment['input']['newScrollLock'] = environment['runtime']['inputDriver'].getScrollLock(environment)
|
environment['input']['newScrollLock'] = environment['runtime']['inputDriver'].getScrollLock(environment)
|
||||||
environment['input']['lastInputTime'] = time.time()
|
environment['input']['lastInputTime'] = time.time()
|
||||||
environment['input']['shortcutRepeat'] = 1
|
environment['input']['shortcutRepeat'] = 1
|
||||||
return timeout
|
return eventReceived
|
||||||
|
|
||||||
def grabDevices(self, environment):
|
def grabDevices(self, environment):
|
||||||
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'grabDevices'):
|
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'grabDevices'):
|
||||||
|
Loading…
Reference in New Issue
Block a user