Skip to content

Commit

Permalink
Merge pull request #54 from insidewhy/fix-print
Browse files Browse the repository at this point in the history
use setcbreak instead of setraw, fixes #53
I didn't tried it asynchronously, but I see no difference synchronously. I just trust on you :)
  • Loading branch information
magmax authored Feb 28, 2021
2 parents 00fec25 + 1ed1cbf commit 3317549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion readchar/readchar_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readchar():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
tty.setcbreak(sys.stdin.fileno())
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
Expand Down

0 comments on commit 3317549

Please sign in to comment.