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

Fix IME input bug #718

Merged
merged 9 commits into from
Jan 11, 2025
Merged

Fix IME input bug #718

merged 9 commits into from
Jan 11, 2025

Conversation

minicom365
Copy link
Contributor

@minicom365 minicom365 commented Jan 10, 2025

Fixes an issue where synchronization does not work properly when entering Korean or Chinese characters in the left or right text box.

Before fixing

[Before fixing]

After fixing

[After fixing]

fixing

[fixing]

Here's where the problem starts:

  1. input_method_from is defined as a value other than -1 and then left alone.
  2. In the following function, input_method_used is defined as true.
    3-1. When a complete character is entered, Korean commitString is uniquely entered as a blank space. This makes the code flow as if a string was entered but not entered.
    3-2. Since input_method_used continues to be true, even if alphabets or numbers are entered, the previous commitString is repeated.

I think that fixing this issue will also solve the input issues like #76 #313 #647 #654.
I tried using the Pinyin QQ inputter to verify, but I couldn't implement the issue.


Additionally, when a character is not completed, drawing strokes or shadows does not work in real time. This is because Document.toPlainText() does not include preeditString . However, I do not know how to fix this cleanly.

@dmMaze
Copy link
Owner

dmMaze commented Jan 10, 2025

Thanks for your effort.
I tried 10ef9fe, the synchronization failed when I typed full-width punctuations such as ,。——?……

@dmMaze
Copy link
Owner

dmMaze commented Jan 10, 2025

Besides, what did you mean by Korean or Chinese characters ? I have no trouble with Chinese characters using the system input method.

@minicom365
Copy link
Contributor Author

I thought the problem was solved because I didn't know how to use the IME for that language and couldn't implement it. I just restored that part.

@minicom365
Copy link
Contributor Author

Besides, what did you mean by Korean or Chinese characters ? I have no trouble with Chinese characters using the system input method.

I installed the Pinyin QQ input tool and did a quick test, and there was no problem, so I mentioned Chinese as well. It was a mistake.

@minicom365
Copy link
Contributor Author

minicom365 commented Jan 10, 2025

  1. Prevent the cursor from going out of range by modifying change_added = added - removed.
  2. Update the from cursor only when preedit is in progress. However, since full-width characters are input without the preedit process, modify it to always update the from cursor.

I have confirmed that full-width characters can be input with this modification. However, I could not confirm —— and … … because I do not know how to input them with the keyboard.

@dmMaze
Copy link
Owner

dmMaze commented Jan 11, 2025

I could not confirm —— and … …

Looks good to me. Thanks again!

@dmMaze dmMaze merged commit 4bbd328 into dmMaze:dev Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants