wslg icon indicating copy to clipboard operation
wslg copied to clipboard

IME (Input Method Editor) Support

Open imbushuo opened this issue 4 years ago • 10 comments

WSLg should implement IME support for CJK locale scenarios. Currently, the WSLg & WSL architecture can support existing Linux IME facilities (e.g. ibus) as tested, however, manual configuration and startup is required.

Solution An ideal solution should reuse the Windows IME infrastructure and transport the input content to Linux window for the best experience. However, this might needs much engineering effort.

Alternative Solutions Alternatively, WSLg can start the IME daemon and configure required environment variables (e.g. QT_IM_MODULE, IBUS_USE_PORTAL, GTK_IM_MODULE and such) without manual steps.

Additional context

  • Having proper IME support is almost a must-need for CJK locale users.
  • ~IME input flyout locations might need to be validated, but so far looks okay (60%) to me when using IBUS on WSLg.~ Update: Not really. Layout bug: https://github.com/microsoft/wslg/issues/8

imbushuo avatar Mar 09 '21 00:03 imbushuo

also i met a problem about the absence of fonts. and solved by adding a soft link :

ln -s /mnt/c/Windows/Fonts   /usr/share/fonts/<anyName>
fc-cache -fv

intHbl avatar May 08 '21 11:05 intHbl

I would prefer Windows native IME over ibus/fcitx. to be honest, despite their developers' hard work, which is very appreciated, IMEs on Linux have yet not reached the quality of those on Windows (which are supported by big companies). Windows native IME also provides a more smooth switching between Windows and WSLg apps.

ruixingw avatar May 30 '21 09:05 ruixingw

Maybe integrating the ibus daemon icon in the right side of the windows taskbar along could be a good idea.

ghost avatar Jun 17 '21 04:06 ghost

Are there any examples or tutorials of ibus working on WSL? I managed to get fcitx to work on X11 applications like Emacs within WSL through some googling, but I can't find any information of ibus working on WSL.

archiif avatar Jul 02 '21 14:07 archiif

maybe we can create a remote virtual keyboard communicate with local ime in windows and set input-method section in weston.ini.

roodkcab avatar Nov 11 '21 08:11 roodkcab

dig a litter more about input-method protocol and text-input protocol on Weston. using zwp_input_method_v1_listener and wl_keyboard_listener together will get the job done. Weston provides a demo in clients/simple-im.c and clients/keyboard.c to illustrate how to use these APIs. I'll give it a try on solving this issue.

roodkcab avatar Nov 12 '21 02:11 roodkcab

Is this really a problem that can be solved within the scope of this git repository? It looks like there is some internal processing of Windows involved.🤔

linghengqian avatar Aug 13 '22 20:08 linghengqian

The ideal solution would be using local (Windows) IME to convert key presses, and injecting converted text into remote (Linux) applications.

RDP protocol should have this capability, as the official Remote Desktop app, by Microsoft, for Android and iOS, can do this. However, Windows version of Remote Desktop client might not have this feature, and WSLGd needs to handle this in Weston.

yume-chan avatar Aug 13 '22 20:08 yume-chan

Agree with @ruixingw, integration with Windows native IME is an important part to involve WSL in Windows experience.

In WSA, there's a virtual IME which interact with Windows IME input and handle flyout properly, that I can use my familiar IME in WSA apps.

david50407 avatar Oct 15 '22 17:10 david50407

any update?

donglixp avatar Oct 24 '25 08:10 donglixp