Open malversan opened 4 years ago
Using tty.setcbreak() messes output after key capture, leaving console echo permanently deactivated onwards.
This can be avoided by touching only the necessary tty terminal flags instead of calling tty.setbreak().
So in PlatformUnix.context(), instead of doing this:
old_settings = self.termios.tcgetattr(fd) self.tty.setcbreak(fd)
this works better and without unwanted effects:
old_settings = self.termios.tcgetattr(fd) raw_settings = old_settings.copy() raw_settings[self.tty.LFLAG] = raw_settings[self.tty.LFLAG] & ~(self.termios.ECHO | self.termios.ICANON | self.termios.ISIG) self.termios.tcsetattr(fd, self.termios.TCSADRAIN, raw_settings)
Tested in: Ubuntu 16.04 Python 3.5.2
Using tty.setcbreak() messes output after key capture, leaving console echo permanently deactivated onwards.
This can be avoided by touching only the necessary tty terminal flags instead of calling tty.setbreak().
So in PlatformUnix.context(), instead of doing this:
this works better and without unwanted effects:
Tested in: Ubuntu 16.04 Python 3.5.2