Skip to content

Bugfix: Calling getkey(blocking=False) results in missed keyboard inputs#18

Open
d0ivanov wants to merge 1 commit intokcsaff:masterfrom
d0ivanov:master
Open

Bugfix: Calling getkey(blocking=False) results in missed keyboard inputs#18
d0ivanov wants to merge 1 commit intokcsaff:masterfrom
d0ivanov:master

Conversation

@d0ivanov
Copy link
Copy Markdown

@d0ivanov d0ivanov commented Nov 8, 2020

Inputs are missed, because when setting tty.setcbreak the default value
of the when argument is used which means that the option will have effect
after transmitting all queued output and discarding all queued input which
may not happen immediately so some inputs will be lost.

References:
- https://docs.python.org/3/library/tty.html
- https://docs.python.org/3/library/termios.html#termios.tcsetattr

Inputs are missed, because when setting `tty.setcbreak` the default value
of the `when` argument is used which means that the option will have effect
after transmitting all queued output and discarding all queued input which
may not happen immediately so some inputs will be lost.

References:
	- https://docs.python.org/3/library/tty.html
 	- https://docs.python.org/3/library/termios.html#termios.tcsetattr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant