Skip to content
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

backspace fail after ime input #4908

Closed
tkkcc opened this issue Aug 3, 2024 · 7 comments · Fixed by #4912
Closed

backspace fail after ime input #4908

tkkcc opened this issue Aug 3, 2024 · 7 comments · Fixed by #4912
Labels
bug Something is broken

Comments

@tkkcc
Copy link
Contributor

tkkcc commented Aug 3, 2024

Describe the bug
Peek 2024-08-03 18-25

To Reproduce
run master(d856f7b) egui_demo_app, use fcitx5 ime to input unicode words in text_edit, press backspace won't delete char, but typing, ime input and del key still work.

Expected behavior
backspace delete char

Desktop (please complete the following information):

  • OS: archlinux, fcitx5 5.1.10

Additional context
web version work
use chinese font not help

@YgorSouza
Copy link
Contributor

It seems that after fcd02bd, the backspace and arrow keys no longer work in the TextEdit in native linux. I guess it thinks IME is always enabled? Even if I disable the compose key and use only the physical keys, it still doesn't work.

@rustbasic
Copy link
Contributor

It seems that after fcd02bd, the backspace and arrow keys no longer work in the TextEdit in native linux. I guess it thinks IME is always enabled? Even if I disable the compose key and use only the physical keys, it still doesn't work.

Yes. I am currently preparing to commit. Do you use IME? or Will it be recognized as IME enabled even in English?

@YgorSouza
Copy link
Contributor

I don't have IME, just a regular US English keyboard. I use the compose key from the Gnome desktop environment, which allows me to enter special characters, e.g., RCtrl + " + E enters the Ë character. I don't know if that counts as IME, but the arrow keys and backspace still don't work if I turn that off in the system settings. The TextEdit gets the IME enabled event as soon as I click on it. It is disabled when I move the window, and the enabled again. If I enter a special character with the compose key, it gets the commit, disabled, and enabled events. So basically it is always enabled while the TextEdit has focus.

image

Also, when I press the compose key, it adds a · character to the string until I press the other keys, and if I click away the character just stays there.

Screencast.from.2024-08-04.11-57-14.mp4

@rustbasic
Copy link
Contributor

Yes, that special character input is considered IME.

Please check if there are any problems when applying #4912.

@YgorSouza
Copy link
Contributor

Yes, that special character input is considered IME.

Please check if there are any problems when applying #4912.

This does fix the problem with the backspace and the arrow keys for me, and the compose key is still working like before.

@rustbasic
Copy link
Contributor

This does fix the problem with the backspace and the arrow keys for me, and the compose key is still working like before.

thank you.

I hope it will work well in Chinese too.

@tkkcc
Copy link
Contributor Author

tkkcc commented Aug 4, 2024

thank you, it's fix for me too

emilk pushed a commit that referenced this issue Aug 5, 2024
Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related #4358
* Related #4430 
* Related #4436
* Related #4794 
* Related #4896
* Closes #4908 

Issues: backspace fail after ime input
* #4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
emilk pushed a commit that referenced this issue Aug 28, 2024
…oses focus. (#4896)

Fix: Ensures correct IME behavior when the text input area gains or
loses focus.

Fix: Handling `state.ime_enabled` in multiple `TextEdit`.
Fix: A symptom of characters being copied when there are multiple
TextEdits.

* Related #4137
* Related #4358 
* Closes #4374
* Related #4436
* Related #4794 
* Related #4908 

* Related #5008

Fix Issues: When focus is moved elsewhere, you must set
`state.ime_enabled = false`, otherwise the IME will have problems when
focus returns.

Fix Issues: A symptom of characters being copied when there are multiple
TextEdits.
Deletes all current `IME events`, preventing them from being copied to
`other TextEdits`, without saving the `TextEdit ID`,

( Related Issues: Some `LINUX` seem to trigger an IME enable event on
startup. So, when we gained focus, we do `state.ime_enabled = false`. )
rib pushed a commit to EmbarkStudios/egui that referenced this issue Sep 30, 2024
Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related emilk#4358
* Related emilk#4430 
* Related emilk#4436
* Related emilk#4794 
* Related emilk#4896
* Closes emilk#4908 

Issues: backspace fail after ime input
* emilk#4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
486c pushed a commit to 486c/egui that referenced this issue Oct 9, 2024
Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related emilk#4358
* Related emilk#4430 
* Related emilk#4436
* Related emilk#4794 
* Related emilk#4896
* Closes emilk#4908 

Issues: backspace fail after ime input
* emilk#4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
486c pushed a commit to 486c/egui that referenced this issue Oct 9, 2024
…oses focus. (emilk#4896)

Fix: Ensures correct IME behavior when the text input area gains or
loses focus.

Fix: Handling `state.ime_enabled` in multiple `TextEdit`.
Fix: A symptom of characters being copied when there are multiple
TextEdits.

* Related emilk#4137
* Related emilk#4358 
* Closes emilk#4374
* Related emilk#4436
* Related emilk#4794 
* Related emilk#4908 

* Related emilk#5008

Fix Issues: When focus is moved elsewhere, you must set
`state.ime_enabled = false`, otherwise the IME will have problems when
focus returns.

Fix Issues: A symptom of characters being copied when there are multiple
TextEdits.
Deletes all current `IME events`, preventing them from being copied to
`other TextEdits`, without saving the `TextEdit ID`,

( Related Issues: Some `LINUX` seem to trigger an IME enable event on
startup. So, when we gained focus, we do `state.ime_enabled = false`. )
hacknus pushed a commit to hacknus/egui that referenced this issue Oct 30, 2024
Fix: Changed the handling method of `Ime::Preedit(_, None)`

Fix: backspace fail after ime input

* Related emilk#4358
* Related emilk#4430 
* Related emilk#4436
* Related emilk#4794 
* Related emilk#4896
* Closes emilk#4908 

Issues: backspace fail after ime input
* emilk#4908 (Chinese)

Changed the handling method of `Ime::Preedit(_, None)`
hacknus pushed a commit to hacknus/egui that referenced this issue Oct 30, 2024
…oses focus. (emilk#4896)

Fix: Ensures correct IME behavior when the text input area gains or
loses focus.

Fix: Handling `state.ime_enabled` in multiple `TextEdit`.
Fix: A symptom of characters being copied when there are multiple
TextEdits.

* Related emilk#4137
* Related emilk#4358 
* Closes emilk#4374
* Related emilk#4436
* Related emilk#4794 
* Related emilk#4908 

* Related emilk#5008

Fix Issues: When focus is moved elsewhere, you must set
`state.ime_enabled = false`, otherwise the IME will have problems when
focus returns.

Fix Issues: A symptom of characters being copied when there are multiple
TextEdits.
Deletes all current `IME events`, preventing them from being copied to
`other TextEdits`, without saving the `TextEdit ID`,

( Related Issues: Some `LINUX` seem to trigger an IME enable event on
startup. So, when we gained focus, we do `state.ime_enabled = false`. )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
3 participants