godot
godot copied to clipboard
Annoying letters left when switching chinese input method to english input method
Tested versions
- Reproducible in: 4.3 stable, 4.4 rc1
System information
Godot v4.4.rc1 - Windows 10 (build 19045) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 32.0.15.6603) - Intel(R) Core(TM) i5-6300HQ CPU @ 2.30GHz (4 threads)
Issue description
Maybe related to #96215. Using shift+ctrl or win+space to switch from Chinese IME to English IME during an unconfirmed composition will cause some annoying ghost letters left. No problem occurs when switching IMEs via mouse left-click.
This issue occurs in all places in Godot. I can't reproduce it outside of godot e.g. notepad, GitHub text editor, webpage address or any other places.
I only found two solutions to kill the annoying ghost letters. Clicking on other editable places or switching back to Chinese IME to reenter words. Backspace and delete don't work. The most frustrating part is that if you provide a TextEdit/LineEdit allowing players to input text, they may encounter this issue when using a Chinese IME.
Edit: Can't reproduce with Japanese IME. Can't reproduce with Korean IME. Test switching Chinese IME to Japanese/Korean IMEs can also reproduce this issue.
Annoying letters left:
Reproducible:
Enabling sound will help understand the issue.
- Script Editor
https://github.com/user-attachments/assets/dc52e17e-362c-4175-80c1-09219eb054b4
- Filters
https://github.com/user-attachments/assets/860a9685-fa2b-4a52-81a0-26ffd8aadffe
https://github.com/user-attachments/assets/a7094b1f-1c24-4977-ab0d-30cce74e03d2
- Control's Text
https://github.com/user-attachments/assets/db312ad6-fdfe-46b4-b228-48ec337baba0
- TextEdit Input
https://github.com/user-attachments/assets/b0bcde66-0354-4e79-bfb7-eedc922361ad
- LineEdit Input
https://github.com/user-attachments/assets/18c5490b-79b2-4391-a323-71a5e9f917a2
Correct Behavior:
The correct behavior should be to cancel this input when switching.
- Github
https://github.com/user-attachments/assets/cd71fc32-9eca-4611-95d5-e50f7377a465
- Address
https://github.com/user-attachments/assets/429fd675-2ead-4531-bac4-ded6f6f2de15
Steps to reproduce
- Activate any Chinese IME e.g. Microsoft Pinyin IME is also able to reproduce the issue
- Try to type some letters in wherever
- Don't press
enterorshiftto confirm English words input. And also don't pressspaceto confirm Chinese words input - Just use
shift+ctrlorwin+spaceto switch to English(or other languages) IME - You will see some annoying underlined ghost letters left
Minimal reproduction project (MRP)
N/A
Duplicate of #81990?😭
Add another interesting discovery, Chinese IME seems to separate Chinese characters with single quotation marks before confirming input, and these single quotation marks are obviously recognized by the editor.
Demo:
https://github.com/user-attachments/assets/7e43889a-9ae6-4a33-be48-7812aa56b076
Newly added: Behavior comparison of Chinese and Japanese IME
https://github.com/user-attachments/assets/7f9623c6-2749-45d6-88a1-27e9fabcccde
When using Japanese IME, switching IME will confirm this input(consistent with using the left mouse button or enter or space bar to confirm input, etc.) When using Chinese IME, switching IME will leave input cache with underline.
Note: In the above demonstration, the first line uses the left mouse button to confirm, and the second line uses switching IME.