diff --git a/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py b/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py index e6366659..5d5d2d0b 100644 --- a/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py +++ b/src/fenrirscreenreader/commands/onScreenUpdate/60000-history.py @@ -15,7 +15,6 @@ class command(): pass def getDescription(self): return '' - def run(self): if self.env['screen']['newAttribDelta'] != '': return @@ -23,8 +22,13 @@ class command(): return if self.env['runtime']['cursorManager'].isCursorVerticalMove(): return - if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): - return + if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: + if not (self.env['runtime']['inputManager'].getLastDeepestInput() in [['KEY_UP'],['KEY_DOWN']]): + return + if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: + if not (self.env['runtime']['byteManager'].getLastByteKey() in [b'^[[A',b'^[[B']): + return + prevLine = self.env['screen']['oldContentText'].split('\n')[self.env['screen']['newCursor']['y']] currLine = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']] if prevLine == currLine: diff --git a/src/fenrirscreenreader/core/byteManager.py b/src/fenrirscreenreader/core/byteManager.py index 62819ca7..777ebaba 100644 --- a/src/fenrirscreenreader/core/byteManager.py +++ b/src/fenrirscreenreader/core/byteManager.py @@ -65,6 +65,8 @@ class byteManager(): self.repeat = 1 self.lastByteKey = convertedEscapeSequence self.lastInputTime = time.time() + def getLastByteKey(self): + return self.lastByteKey def handleControlMode(self, escapeSequence): convertedEscapeSequence = self.unifyEscapeSeq(escapeSequence) if convertedEscapeSequence == b'^[R':