Terminal emu: restoring cursor position after ADB

This commit is contained in:
Daniele Verducci su MatissePenguin 2020-12-15 18:14:29 +01:00
parent f1e7622e17
commit 0b355bc704

View File

@ -46,7 +46,11 @@ class TerminalEmulator:
# Is a character
ser.write(bytes([key]))
elif int(key) == 1: # CTRL+A, enter ADB mode
# Save cursor position
(xPos, yPos) = w.getyx()
self.adbMode(w, ser)
# Restore cursor position
w.move(xPos, yPos)
w.refresh()
@ -77,8 +81,6 @@ class TerminalEmulator:
stdscr.nodelay(True)
if __name__ == '__main__':
import argparse