rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.81k stars 902 forks source link

Character separation issue when typing in Korean #3095

Open ycy3723 opened 1 year ago

ycy3723 commented 1 year ago

Korean is a language where consonants and vowels combine to form a single syllable.

When changing the OS input source to Korean and typing in Neovide input mode, the first syllable entered is separated. (Immediately after changing the input source, only the first character is separated, and subsequent typing is entered correctly.)

I reported the issue on Neovide and I got clue on winit.

Could you please check this issue history? (I'm not good at english..)

fredizzimo commented 1 year ago

I'll add the relevant findings here.

When typing 안녕하세요, Neovide receives the following from Winit

  1. First a regular keyboard input with ㅇ
  2. IME commit with ㅏ
  3. IME commit ㄴ
  4. IME commit 녕
  5. IME commit 녕
  6. IME commit 하
  7. IME commit 세
  8. IME commit 요

And the end result on the screen is ㅇㅏㄴ녕하세요 instead of the expected 안녕하세요.

The problem seems to be that the first keyboard input is sent as a regular keyboard input and removed from the IME system, so that the following inputs no longer are valid IME sequences, and therefore sent as individual glyphs.

It was also reported that Alacritty has the same issue.