termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
2.12k stars 314 forks source link

Lack of Chinese input method, consider to add fcitx5 #147

Closed EdwardZhangLink closed 1 year ago

EdwardZhangLink commented 2 years ago

I have installed TeXLive and texstudio, but I lack a proper Chinese input method to write the documentation. I need a Chinese input method like fcitx5 to add to the library.

Fcitx5 Wiki Page https://fcitx-im.org/wiki/Fcitx_5 https://fcitx-im.org/wiki/Fcitx_5/zh-cn Fcitx5 Source Code Page https://github.com/fcitx/fcitx5

twaik commented 2 years ago

I know what is fcitx5, but it will not help. Android sends proper keycodes only in the case if you input english characters, in any other case it sends Unicode characters. Xwayland can receive input only as linux scancodes. I am planning to make additional X client based on x11vnc and xdotool code which will be able to input every single Unicode symbol.

In the case if you can not wait you can try to use any linux (not Android) on screen keyboard solution which supports chinese.

EdwardZhangLink commented 2 years ago

I know what is fcitx5, but it will not help. Android sends proper keycodes only in the case if you input english characters, in any other case it sends Unicode characters. Xwayland can receive input only as linux scancodes. I am planning to make additional X client based on x11vnc and xdotool code which will be able to input every single Unicode symbol.

In the case if you can not wait you can try to use any linux (not Android) on screen keyboard solution which supports chinese.

First of all, thank you for your reply. I am indeed a bit frustrated. I tried to understand GUI related knowledge, but now they are too complicated for me. Maybe I didn't understand your reply, maybe I didn't express it clearly, actually I don't intend to send Chinese characters to xwayland directly through Android keyboard, but give Chinese candidate words in pinyin form by inputting English characters through input method. I think fcitx5 will work like this, but maybe not so simple, hope I can get some help. Besides, I found it support wayland in fcitx5 related page, but I don't know if it is helpful. Because the special feature of Chinese input is always to use an input method to finalize Chinese input by giving Chinese character candidates, but Linux on-screen keyboard obviously doesn't have such function. Maybe we can consider to adapt package like fcitx5 first, and then test whether it is applicable. Finally, looking forward to your progress!

junrenshi commented 1 year ago

It is great to see Termux now includes two basic fcitx5 packages: fcitx5 and fcitx5-data. However, in order to actually use it to input Chinese, I have to compile and manually install extra tools including fcitx5-chinese-addons, fcitx5-configtool, fcitx5-gtk, fcitx5-qt, and libime. All these tools can be downloaded from the github repository of the fcitx project. It would be ideal if these tools are also included in Termux packages.

twaik commented 1 year ago

termux-x11 is not related to packages in termux-packages. Everything I can do is to add Unicode input. Work is already in progress.

twaik commented 1 year ago

Check latest build (which is "Input of custom unicode characters.").

I do not know chinese, I simply was typing every single symbol I saw in Samsung's keyboard suggestions. Dont laugh on me. ![photo_2023-03-05_00-13-53](https://user-images.githubusercontent.com/9674930/222930963-c9ac4d71-bd4b-44ad-9185-3052be1ac10b.jpg)
twaik commented 1 year ago

Can I close this?

twaik commented 1 year ago

@EdwardZhangLink @junrenshi @kde-yyds @dontknowhy Can you please confirm it works?

EdwardZhangLink commented 1 year ago

@EdwardZhangLink @junrenshi @kde-yyds @dontknowhy Can you please confirm it works?

The check just performed shows that it works perfectly, it's easier and more elegant than installing the input method in termux, very good work, thank you!

twaik commented 1 year ago

You are welcome. Sorry for waiting for this feature.

kde-yyds commented 1 year ago

so which commit fixed it?I can't find it

twaik commented 1 year ago

https://github.com/termux/termux-x11/commit/f930dfebdb3becc993746f22329c2005e41267c3#diff-bb9040321da9b7beebb6d6a78ad0256377ac3a5f51f7d78daf0ec921e0ac9e7aR389

dontknowhy commented 1 year ago

Screenshot_20230402_134402.jpg A sad story.

twaik commented 1 year ago

Try other keyboard.