Closed soya-daizu closed 1 year ago
How can I use the IME input method. I even do not know that IME exists.
It's straight forward on Windows and macOS but it can be tricky in some Linux distributions. Here are some guides I found about installing Japanese input methods for example.
Linux https://wiki.archlinux.org/title/Input_method Windows https://www.coscom.co.jp/learnjapanese801/install_ime.html macOS https://support.apple.com/guide/japanese-input-method/welcome/mac
As for installing IMEs on Arch based distributions, I would recommend the fcitx5-mozc
package. There should be similarly named packages in other major distributions as well. Fcitx5 is like a frontend for different IMEs and Mozc is the actual IME behind it.
If these are too much of work for you and you don't mind not being able to verify the patch, I can try to fix it and make a PR for it.
If these are too much of work for you and you don't mind not being able to verify the patch, I can try to fix it and make a PR for it.
That would be great!
Merges! Many thanks for the PR.
myMPD version: 10.2.2
Describe the bug
Users in CJK regions use IME (Input Method Editor) to input text in their languages. IMEs have their own input state that is separate from the text box, and use Enter key to "exit" the composition and enter the composed text into the text box.
In Firefox, the
keyup
andkeydown
events are also fired during IME composition, meaning that the Enter key that is pressed to finish the composition also triggers myMPD's Enter key behavior in the search box.This produces undesirable effect that "enters" the filtering condition before user inputs all filtering words if they finish composition in the middle of the text.
This issue does not appear in Chrome as it doesn't fire Enter key events with
keyup
during IME composition.To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should not clear the search box and enter the filtering condition below the search box. Users should only be able to enter search conditions and clear the search box after the IME composition is ended.
Server plattform (please complete the following information):
Client plattform (please complete the following information):
Additional context
One solution is to use the event.isComposing property, but myMPD seems to be using
keyup
instead ofkeydown
to detect key presses, andevent.isComposing
with Enter key can only be true in thekeydown
events.Is using
keyup
instead ofkeydown
necessary to produce the current behavior?If we are sticking with
keyup
, there are events specific to IME composition like compositionstart and compositionend, so maybe we can hold the composition state in the back and ignore the Enterkeyup
while that state is true.