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
AndroidTouchInput doesn't deal with KeyEvent.ACTION_MULTIPLE #1297
Comments
In other word,I can get "h" on TouchEvent but get nothing instead of "hi" on KeyEvent beacuse of mCharacters field missing. |
Thanks for the bug report. |
Can you provide a minimal test app for this? It would make things easier when fixing it. |
ok,I'll do that soon.
…------------------ 原始邮件 ------------------
发件人: "Rickard Edén"<notifications@github.com>;
发送时间: 2020年4月2日(星期四) 晚上6:51
收件人: "jMonkeyEngine/jmonkeyengine"<jmonkeyengine@noreply.github.com>;
抄送: "123"<921776645@qq.com>; "Author"<author@noreply.github.com>;
主题: Re: [jMonkeyEngine/jmonkeyengine] AndroidTouchInput doesn't deal with KeyEvent.ACTION_MULTIPLE (#1297)
Can you provide a minimal test app for this? It would make things easier when fixing it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Here it is:https://github.com/jarlure/AndroidTouchInputTest
|
I'm not sure how you get the word hints when bringing up JmeSystem.showSoftKeyboard(true) |
you should install SogouInput_android_v10.6_sweb.apk ,a very popullar Chinese input app.You can find it by https://github.com/jarlure/AndroidTouchInputTest/tree/master/app/src/main/assets |
I can see some benefits to this, but it sounds like a very special use case. Fixing it is rather simple, but it seems difficult to test in a generic way. |
Fixing bug is better than ignore it. If we do nothing, we will lose lots of Chinese users. Think about an app that can't type any word, how disappointing! :( |
I have a better understanding of the problem now and have I have fixed it to the best of my abilities. But I'm having issues testing it, and I don't want to install any third party apps to do so. I have installed google's pinyin keyboard but it still shows up as QWERTY in the app. If I can't test it I might just put up a PR and hope someone else can confirm it. Or make a distribution with your test app and you can test it. |
Thank you very much for helping us. Android default input can also show this problem, even though it doesn't have powerful hint. You could use Russian or Arabic language for test. They all send KeyEvent.ACTION_MULTIPLE. I guess all languages with non-ASCII character exist the bug in jme-android. |
Thanks for the help. Using russian locale did the trick. PR created. |
* fix for #1297 * fix for #1297 * fixed line endings? * Revert "fixed line endings?" This reverts commit 905356a. * fixed line endings? * fixed line endings? * fixed line endings? * fixed line endings? * Update AndroidTouchInput.java using dos2unix * ... * ... * unix2dos AndroidTouchInput.java * undo a couple more changes not related to PR 1323 Co-authored-by: Stephen Gold <sgold@sonic.net>
Hey,guys!
I found the bug when I typed "你好"(=“Hello”) by keyboard's input method. Maybe chinese input method is special: If you type an "h",you get a KeyEvent with action=KeyEvent.ACTION_DOWN;But when you choose "hi" from input method tips"1.h 2.hi 3.huge 4.hf 5.Hash",you get a KeyEvent with action=KeyEvent.ACTION_MULTIPLE.
I know com.jme3.input.android.AndroidTouchInput listen to these events and it deals with KeyEvent.ACTION_DOWN in method public boolean onKey(KeyEvent event).But it regards KeyEvent.ACTION_MULTIPLE as KeyInputEvent by mistake,and lost mCharacters field.
I beg to fix it,please!
The text was updated successfully, but these errors were encountered: