Input Methods

Philipp blei42 at gmail.com
Mon Jul 9 09:32:55 PDT 2012


Hi everyone,

I have been thinking about trying to implement a simple composing
input method (like for example pinyin). I read
http://blog.jpetersen.org/2012/06/20/text-input-method-support-in-wayland/
and https://wiki.maliit.org/Wayland_Input_Method_System_Proposal but I
didn't manage to understand how composing input methods are supposed
to work, specifically there is no mention about how keyboard input is
going to be handled. I'm not sure if I overlooked something, or if
this part is not specified yet.

I thought about the problem a bit and in my opinion the cleanest
solution would be the following: An input method can request direct
keyboard input; if it does so, then the keyboard input that would flow
to the application in focus is instead redirected to the input method,
otherwise the keyboard input is sent to the application as normal.
Does this sound reasonable?

Now I'm trying to hack in redirection of keyboard input to the active
input method iff there is an input method that requested keyboard
input and there is an active text model. I think I identified the
points where I would have to do that (e.g. in text_model_activate
etc.). My question is: how do redirect the keyboard input? I'm a bit
lost in a huge tangle of pointers and messages and requests, it would
be great if I could get a pointer or two (hur hur) to get started in
the right direction.

Cheers
Philipp


More information about the wayland-devel mailing list