Update byteManager.py

This commit is contained in:
chrys87 2018-05-30 12:01:30 +02:00 committed by GitHub
parent 4ce7533121
commit 4a102bda20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,6 @@ fenrirPath = os.path.dirname(currentdir)
class byteManager(): class byteManager():
def __init__(self): def __init__(self):
self.command = ''
self.switchCtrlModeOnce = 0 self.switchCtrlModeOnce = 0
self.controlMode = True self.controlMode = True
self.repeat = 1 self.repeat = 1
@ -83,10 +82,10 @@ class byteManager():
return False return False
def detectByteCommand(self, escapeSequence): def detectByteCommand(self, escapeSequence):
convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence) convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence)
self.command = self.env['runtime']['inputManager'].getCommandForShortcut(convertedEscapeSequence) command = self.env['runtime']['inputManager'].getCommandForShortcut(convertedEscapeSequence)
if self.command != '': if command != '':
self.env['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, self.command) self.env['runtime']['eventManager'].putToEventQueue(fenrirEventType.ExecuteCommand, command)
self.command = '' command = ''
return True return True
return False return False
def loadByteShortcuts(self, kbConfigPath=fenrirPath + '/../../config/keyboard/pty.conf'): def loadByteShortcuts(self, kbConfigPath=fenrirPath + '/../../config/keyboard/pty.conf'):