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

Add workaround for input method users #33

Merged
merged 5 commits into from Mar 14, 2023

Conversation

kappa-maintainer
Copy link
Contributor

This approach is tricky and need further testing by #chinese-general
This PR also contain a new line breaking algorithm based on icu4j, for which the Mojang version was excluded.

@eigenraven eigenraven self-requested a review March 8, 2023 21:46
@eigenraven
Copy link
Member

Can you run the spotlessApply gradle task to reformat the code?

@kappa-maintainer
Copy link
Contributor Author

Connection to spotless is a bit unstable here, so I removed it to speedup gradle

@kappa-maintainer kappa-maintainer marked this pull request as draft March 9, 2023 14:41
@kappa-maintainer
Copy link
Contributor Author

I got some other idea when I dealing with book signing. I will mark this PR ready to review once it's done

@kappa-maintainer kappa-maintainer changed the title Add IME Wrapper for input method users Add workaround for input method users Mar 14, 2023
@kappa-maintainer
Copy link
Contributor Author

The wrapper approach is hard to handle NEI and has obvious input delay, so I switched to the current one.
It works by adding an imeOn flag to Display and refuse non-char event when it is true. An IME char Queue is also added to Keyboard to bypass the limited size of keyEventChars[]. The imeOn is switched whenever common IME switching keybind detected or F12 is pressed, the detail of this part may need further test and improvement.

@kappa-maintainer kappa-maintainer marked this pull request as ready for review March 14, 2023 10:52
Copy link
Member

@eigenraven eigenraven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few style changes, and disabled the IME hacks by default (you can turn them on and the keybinds in the config now)

@eigenraven eigenraven merged commit bc0bf57 into GTNewHorizons:master Mar 14, 2023
1 check passed
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.

None yet

2 participants