sharplispers / clx

a fork of crhodes' fork of danb's fork of the CLX library, an X11 client for Common Lisp
Other
114 stars 46 forks source link

Enable support for input method (fcitx) #176

Open C-Entropy opened 3 years ago

C-Entropy commented 3 years ago

Hi I came from McCLIM, where I found I can't use fcitx to switch input method to input Chinese. And I found that McCLIM is using CLX as backend, so I turned here.

According to this, I suppose we have to use existing xim(Xlib)/xcb-imdkit(XCB) , or write one our own CLX-IM(CLX) .

Any advice?

I have taken a brief look over xcb-imdkit, and it seems possible to write something like CLX-IM, I will give it a try.

dkochmanski commented 3 years ago

Having a support for input methods in clx is something we want of course, but please keep in mind, that clx is a pure common lisp implementation, so if your solution will end up as a set of ffi bindings, then I'd rather see it as a separate library that may be used with clx.

C-Entropy commented 3 years ago

I have taken a look at head files, and it seems what xcb-imdkit depends on is std lib and <xcb/xxx.>. So I think it is possible to write a pure lisp one. But it will take much time due to my poor code ability.

C-Entropy commented 3 years ago

https://github.com/C-Entropy/clx-xim, just start, still fight Allright, almost done. But at the very least, a bug occur. It is killing me. Anyone help?

C-Entropy commented 3 years ago

Keeping receving same key events in event-case even I didn't type anything. Details here:https://groups.google.com/g/fcitx-dev/c/Ef7aJI-j9T4

C-Entropy commented 3 years ago

Okay, Although I still don't know why this happen, but I successfully make it work with mcclim, so I guess it have something to do with event-case, since mcclim is using process-event. But since mcclim is complex, I will keep digging.