dont add key twice
This commit is contained in:
parent
bf72e7fdc7
commit
e7ea7a9e0e
@ -38,13 +38,17 @@ class inputManager():
|
|||||||
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')
|
if not 'KEY_FENRIR' in environment['input']['currInput']:
|
||||||
|
environment['input']['currInput'].append('KEY_FENRIR')
|
||||||
elif mEvent['EventName'] in ['KEY_RIGHTCTRL','KEY_LEFTCTRL'] :
|
elif mEvent['EventName'] in ['KEY_RIGHTCTRL','KEY_LEFTCTRL'] :
|
||||||
environment['input']['currInput'].append('KEY_CTRL')
|
if not 'KEY_CTRL' in environment['input']['currInput']:
|
||||||
|
environment['input']['currInput'].append('KEY_CTRL')
|
||||||
elif mEvent['EventName'] in ['KEY_RIGHTSHIFT','KEY_LEFTSHIFT'] :
|
elif mEvent['EventName'] in ['KEY_RIGHTSHIFT','KEY_LEFTSHIFT'] :
|
||||||
environment['input']['currInput'].append('KEY_SHIFT')
|
if not 'KEY_SHIFT' in environment['input']['currInput']:
|
||||||
else:
|
environment['input']['currInput'].append('KEY_SHIFT')
|
||||||
environment['input']['currInput'].append(mEvent['EventName'])
|
else:
|
||||||
|
if not mEvent['EventName'] in environment['input']['currInput']:
|
||||||
|
environment['input']['currInput'].append(mEvent['EventName'])
|
||||||
environment['input']['currInput'] = sorted(environment['input']['currInput'])
|
environment['input']['currInput'] = sorted(environment['input']['currInput'])
|
||||||
elif mEvent['EventState'] == 2:
|
elif mEvent['EventState'] == 2:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user