-
-
Notifications
You must be signed in to change notification settings - Fork 281
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
When I type in Chinese characters, the browser cannot count #37
Comments
Thanks for bringing this up! To be honest I'm woefully ignorant about CJK input methods, but this is a great opportunity to learn. I'll look into it when I have a bit of time! |
As a Chinese IME user, I would like to provide some insight into the cause of this bug. First, some knowledge about how CJK input works: CJK languages have thousands of commonly used characters, but our keyboard has only about 100 keys available. Thus, we use something called IME (Input Method Editor), which is a software responsible for mapping a stream of keystrokes into another stream of characters. Basically, it works like this:
Be aware that we usually input on a string-by-string basis, rather than char-by-char, which is different from alphabet-based language users. So the problem is this application resets its timer in the onKeyDown callback, which is unfortunately very unreliable to CJK editing (since keystrokes are handled by the IME rather than input control). I think if we reset the timer in the onChange callback would improve the situation a little bit, but I don't think that is the ideal solution since more problems will arise:
So I don't really have an idea now. I don't know how to capture keystrokes when there is an IME active, and I'm not even sure such a method even exists. Maybe the best we can do now is to add some configurable workarounds for CJK users? |
@AraragiHokuto We could use the compositionupdate event, which can capture the inputs in IME. |
It's so funny and useful tools,I want to share to more friend,so I hope you can resolve this issues
The text was updated successfully, but these errors were encountered: