unify left/ right ctrl and shift

This commit is contained in:
chrys 2016-09-18 03:32:24 +02:00
parent b588957fb0
commit bf72e7fdc7

View File

@ -29,12 +29,20 @@ class inputManager():
if mEvent['EventState'] == 0: if mEvent['EventState'] == 0:
if self.isFenrirKey(environment, mEvent): if self.isFenrirKey(environment, mEvent):
environment['input']['currInput'].remove('KEY_FENRIR') 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: else:
environment['input']['currInput'].remove(mEvent['EventName']) environment['input']['currInput'].remove(mEvent['EventName'])
environment['input']['currInput'] = sorted(environment['input']['currInput']) environment['input']['currInput'] = sorted(environment['input']['currInput'])
elif mEvent['EventState'] == 1: elif mEvent['EventState'] == 1:
if self.isFenrirKey(environment, mEvent): if self.isFenrirKey(environment, mEvent):
environment['input']['currInput'].append('KEY_FENRIR') 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: else:
environment['input']['currInput'].append(mEvent['EventName']) environment['input']['currInput'].append(mEvent['EventName'])
environment['input']['currInput'] = sorted(environment['input']['currInput']) environment['input']['currInput'] = sorted(environment['input']['currInput'])