This commit is contained in:
chrys 2018-03-27 00:26:34 +02:00
parent 8753415f65
commit 86fe813313
2 changed files with 6 additions and 2 deletions

View File

@ -20,6 +20,9 @@ class byteManager():
convertedEscapeSequence = escapeSequence
if convertedEscapeSequence[0] == 27:
convertedEscapeSequence = b'^[' + convertedEscapeSequence[1:]
if len(convertedEscapeSequence) > 1:
if convertedEscapeSequence[0] == 94 and convertedEscapeSequence[1] ==91:
convertedEscapeSequence = b'^[' + convertedEscapeSequence[2:]
return convertedEscapeSequence
def loadByteShortcuts(self, kbConfigPath=fenrirPath + '/../../config/keyboard/pty.conf'):
kbConfig = open(kbConfigPath,"r")

View File

@ -108,7 +108,8 @@ class fenrirManager():
self.environment['runtime']['screenManager'].injectTextToScreen(event['Data'])
def handleControlMode(self, escapeSequence):
convertedEscapeSequence = self.environment['runtime']['byteManager'].unifyEscapeSeq(escapeSequence)
if len(convertedEscapeSequence) > 1:
print(chr(convertedEscapeSequence[0]),chr(convertedEscapeSequence[1]))
if convertedEscapeSequence == b'^[R':
self.controlMode = not self.controlMode
self.switchCtrlModeOnce = 0