From bf72e7fdc7552012b4c23eeff53a4f0f85024579 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 18 Sep 2016 03:32:24 +0200 Subject: [PATCH] unify left/ right ctrl and shift --- src/fenrir-package/core/inputManager.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fenrir-package/core/inputManager.py b/src/fenrir-package/core/inputManager.py index a3014506..eaa9d061 100644 --- a/src/fenrir-package/core/inputManager.py +++ b/src/fenrir-package/core/inputManager.py @@ -29,12 +29,20 @@ class inputManager(): if mEvent['EventState'] == 0: if self.isFenrirKey(environment, mEvent): environment['input']['currInput'].remove('KEY_FENRIR') + elif mEvent['EventName'] in ['KEY_RIGHTCTRL','KEY_LEFTCTRL'] : + environment['input']['currInput'].remove('KEY_CTRL') + elif mEvent['EventName'] in ['KEY_RIGHTSHIFT','KEY_LEFTSHIFT'] : + environment['input']['currInput'].remove('KEY_SHIFT') else: environment['input']['currInput'].remove(mEvent['EventName']) environment['input']['currInput'] = sorted(environment['input']['currInput']) elif mEvent['EventState'] == 1: if self.isFenrirKey(environment, mEvent): environment['input']['currInput'].append('KEY_FENRIR') + elif mEvent['EventName'] in ['KEY_RIGHTCTRL','KEY_LEFTCTRL'] : + environment['input']['currInput'].append('KEY_CTRL') + elif mEvent['EventName'] in ['KEY_RIGHTSHIFT','KEY_LEFTSHIFT'] : + environment['input']['currInput'].append('KEY_SHIFT') else: environment['input']['currInput'].append(mEvent['EventName']) environment['input']['currInput'] = sorted(environment['input']['currInput'])