Update inputManager.py

This commit is contained in:
chrys87 2016-08-30 11:59:38 +02:00 committed by GitHub
parent e312ffc22e
commit 344db17f5a

View File

@ -13,7 +13,8 @@ class inputManager():
self.getInputDevices() self.getInputDevices()
self.grabDevices() self.grabDevices()
self.ignoreKeyRelease = 0 self.ignoreKeyRelease = 0
if environment['generalInformation ']['suspend']:
return environment
def proceedInputEvents(self, environment): def proceedInputEvents(self, environment):
timeout = True timeout = True
if not environment['input']['keyForeward']: if not environment['input']['keyForeward']:
@ -25,7 +26,7 @@ class inputManager():
for fd in r: for fd in r:
for event in self.iDevices[fd].read(): for event in self.iDevices[fd].read():
if self.isFenrirKey(environment, event): if self.isFenrirKey(environment, event):
environment['input']['consumeKey'] = not environment['input']['keyForeward'] environment['input']['consumeKey'] = not environment['input']['keyForeward'] and not environment['generalInformation ']['suspend']
if self.isConsumeKeypress(environment): if self.isConsumeKeypress(environment):
self.writeUInput(self.uDevices[fd], event) self.writeUInput(self.uDevices[fd], event)
keyString = '' keyString = ''