Update commandManager.py
This commit is contained in:
parent
bb41f54f7a
commit
d2f8c064ab
@ -64,17 +64,18 @@ class commandManager():
|
|||||||
environment['commandInfo']['lastCommandExecutionTime'] = time.time()
|
environment['commandInfo']['lastCommandExecutionTime'] = time.time()
|
||||||
return environment
|
return environment
|
||||||
|
|
||||||
def isShortcutDefined(self, environment, currShortcutString):
|
def isShortcutDefined(self, environment, shortcut):
|
||||||
return( currShortcutString in environment['bindings'])
|
return( str(shortcut).upper() in environment['bindings'])
|
||||||
|
|
||||||
def setCurrCommandForExec(self, environment, currCommand):
|
def setCurrCommandForExec(self, environment, currCommand):
|
||||||
environment['commandInfo']['currCommand'] = currCommand
|
environment['commandInfo']['currCommand'] = currCommand
|
||||||
return environment
|
return environment
|
||||||
|
|
||||||
def getCommandForShortcut(self, environment, currShortcutString):
|
def getCommandForShortcut(self, environment, shortcut):
|
||||||
if not self.isShortcutDefined(environment, currShortcutString):
|
shortcut = shortcut.upper()
|
||||||
|
if not self.isShortcutDefined(environment, shortcut):
|
||||||
return ''
|
return ''
|
||||||
return environment['bindings'][currShortcutString]
|
return environment['bindings'][shortcut]
|
||||||
|
|
||||||
def isCommandDefined(self, environment, currCommand):
|
def isCommandDefined(self, environment, currCommand):
|
||||||
return( currCommand in environment['commands']['commands'])
|
return( currCommand in environment['commands']['commands'])
|
||||||
|
Loading…
Reference in New Issue
Block a user