haxenme / nme

A cross-platform native backend for Haxe projects
MIT License
479 stars 122 forks source link

[Windows] TextField does not work properly with input method #725

Open tabris17 opened 7 months ago

tabris17 commented 7 months ago

At first, IME candidate list cannot be displayed by default. I fixed this issue by modifying the source code of sdl2.

https://github.com/haxenme/toolkit-sdl/blob/fa51fcb56b152ba6419b6decfef5dad48b075ac2/src/video/windows/SDL_windowskeyboard.c#L373

change

videodata->ime_uiless = UILess_SetupSinks(videodata);

to

videodata->ime_uiless = SDL_FALSE;

and rebuild nme.ndll

The next isssues are:

  1. IME candidate list is at the bottom of the desktop (It should follow the input focus)
  2. Only one character can be entered at a time through the input method (It should be possible to enter multiple characters at once)
  3. When in input method editing mode, the backspace and enter key will affect the content in the TextField (It should be not)

(Hope I have described the issue clearly)