allow echo

This commit is contained in:
~d6 2023-01-23 12:25:59 -05:00
parent 64a24f36e0
commit 6128d558cd
1 changed files with 4 additions and 4 deletions

View File

@ -35,10 +35,10 @@ def main():
size = struct.pack("HHHH", rows, cols, 8, 8) size = struct.pack("HHHH", rows, cols, 8, 8)
fcntl.ioctl(fd, termios.TIOCSWINSZ, size) fcntl.ioctl(fd, termios.TIOCSWINSZ, size)
# disable terminal echo ## disable terminal echo
attr = termios.tcgetattr(fd) #attr = termios.tcgetattr(fd)
attr[3] = attr[3] & ~termios.ECHO #attr[3] = attr[3] & ~termios.ECHO
termios.tcsetattr(fd, termios.TCSADRAIN, attr) #termios.tcsetattr(fd, termios.TCSADRAIN, attr)
# use fd for the terminals stdin/stdout # use fd for the terminals stdin/stdout
os.dup2(fd, sys.stdin.fileno()) os.dup2(fd, sys.stdin.fileno())