New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix broken unicode len checking in examples/textinput.py #2567
Conversation
The example works on pygame 2.0.0, but not on 2.0.1. With this example script, you can see that KEYDOWN events like enter or ctrl-c have filled out
So that's the deal with why this is broken now. @zaphodikus Should this test for Requesting a review from ankith26, because I think their event refactor PRs for 2.0.1 are related to this. |
I consider this change as a "fix" from my event refactor PRs, because the output is same as that in 1.9.6 As to this PR, it is looking good, but I feel that completely removing the |
I have made a new textinput example to supplant this one after my IME fix and IME docs are merged. I'll take a look at this soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 thanks.
Since it's 1.9.6 compatible, I'm ok with this.
(Probably better to remove the len(event.unicode)
bit all together.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this PR seems good to go, to me as well!
Since the original author of this PR seems inactive, should I remove the and len(event.unicode) == 1
check altogether, and then merge this?
I'm ok with that (and also just merging it... up to you?) |
On Win32, the ENTER key handling completely was defeated for some reason, so chatbox entering of text does not do anything since the unicode for ENTER is '\r' and is length 1, not zero.