SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

IME: Draw composition buffer text in textboxes #124

Open LPGhatguy opened 12 months ago

LPGhatguy commented 12 months ago

Currently, while composing text with the system IME, the current composition buffer is not shown:

The yakui textbox example with a Japanese IME composition window shown. The phrase "kamehameha" is being spelled out with several Japanese spellings shown.

Here is an application that handles this well, Windows Terminal:

Windows Terminal with the same composition window as before. The composition window is positioned immediately adjacent to the textbox and the text that we're currently composing is visible in the application.

stolen-programmer commented 12 months ago

I tested several input methods

The winit Ime event contains the content we need

Enabled Preedit Commit Disabled

Among them, Preedit is what we need