Trouble with key callback and Japanese Characters on Windows (macOS works well) #24015
Replies: 1 comment 1 reply
-
Can you clarify which field of the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, first time requesting help here. I apologize now if I'm not following policy or protocol, so please be patient.
Emscripten Version: 4.0.5.
We've been using Emscripten for a long time now.
We converted a very large C/C++ application to Emscripten about 5 years ago. Just recently one of our customers in Japan discovered a problem when they type a character on Windows 11 with the JA keyboard enabled. When the keyboard is set to EN and they press the letter 'a', the key callback
EmscriptenKeyboardEvent
passes the letter 'a'. When we switch the keyboard to JA and press the letter 'a' again, we expect to be passed 'あ', but we are passed the letter 'a' again. I've written a test case that try and simplify the code flows, but the test case works fine. Obviously that means we have something going on in the application that after 5 years we are just seeing, but what?Looking at the
EmscriptenKeyboardEvent
passed to our key callback, the code value we see for 'a' and 'あ' are:On macOS:
On Windows:
We register the key callback as follows:
Our key_callback function definition looks as follows:
We are not sure where to turn or begin to investigate next steps. Clearly the test case works on macOS and Windows using similar threading and same calls in our application, so what could be causing it in our application?
Any help, insight, suggestions, thoughts, debugging, logging that might be helpful is greatly appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions