GTNewHorizons / lwjgl3ify

A mod to run Minecraft 1.7.10 using LWJGL3 and Java 17+
GNU Lesser General Public License v3.0
171 stars 37 forks source link

Add workaround for input method users #33

Closed kappa-maintainer closed 1 year ago

kappa-maintainer commented 1 year ago

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 commented 1 year ago

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

kappa-maintainer commented 1 year ago

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

kappa-maintainer commented 1 year ago

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 commented 1 year ago

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.