From 0abd37f3f4910f7e875c61c550abedc7dab1e209 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 12 Sep 2016 23:29:16 +0200 Subject: [PATCH] rework --- src/fenrir-package/core/inputManager.py | 14 +++----------- src/fenrir-package/input/evdev.py | 2 -- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/fenrir-package/core/inputManager.py b/src/fenrir-package/core/inputManager.py index 4960a4ca..7101e918 100644 --- a/src/fenrir-package/core/inputManager.py +++ b/src/fenrir-package/core/inputManager.py @@ -12,18 +12,9 @@ class inputManager(): return environment def proceedInputEvent(self, environment): timeout = True - if not environment['input']['keyForeward']: - self.ignoreKeyRelease = 0 environment, timeout = environment['runtime']['inputDriver'].getInput(environment) - environment['input']['currShortcutString'] = self.getShortcutString(environment) - if not timeout: - environment['input']['lastInputTime'] = time.time() - environment['input']['consumeKey'] = environment['input']['currShortcut'] != {} and environment['input']['consumeKey'] - if (environment['input']['keyForeward'] and environment['input']['currShortcut'] == {}): - self.ignoreKeyRelease += 1 - if self.ignoreKeyRelease >= 2: # a hack... has to bee done more clean - environment['input']['keyForeward'] = environment['input']['keyForeward'] and not environment['input']['currShortcut'] == {} - return environment, timeout + return environment, timeout + def grabDevices(self, environment): environment['runtime']['inputDriver'].grabDevices(environment) @@ -42,6 +33,7 @@ class inputManager(): environment['runtime']['debug'].writeDebugOut(environment,"Error while writeUInput",debug.debugLevel.ERROR) environment['runtime']['debug'].writeDebugOut(environment, str(e),debug.debugLevel.ERROR) return environment + def getShortcutString(self, environment): if environment['input']['currShortcut'] == {}: return '' diff --git a/src/fenrir-package/input/evdev.py b/src/fenrir-package/input/evdev.py index 62393403..3a7efb58 100644 --- a/src/fenrir-package/input/evdev.py +++ b/src/fenrir-package/input/evdev.py @@ -11,8 +11,6 @@ class input(): self.iDevices = {} self.uDevices = {} self.getInputDevices() - self.grabDevices() - self.ignoreKeyRelease = 0 def initialize(self, environment): return environment def shutdown(self, environment):