I18n text input

Glynn Clements glynn at gclements.plus.com
Tue Jan 19 02:44:30 PST 2010


Russell Shaw wrote:

> > Unless you're planning on spending the next few months learning how
> > text entry works for languages other than English, I'd recommend using
> > a GUI toolkit rather than trying to do it using bare Xlib. Or at least
> > steal the code from such a toolkit.
> 
> I understand everything about non-english text entry and processing.
> 
> When i do:
> 
>    XIM im = XOpenIM(app->display, NULL, NULL, NULL);
> 
> "im" is set to a valid XIM rather than NULL. I thought an input method
> was supposed to be a separate process, but i haven't started one or used
> one previously. Where is this one coming from? What sort of text entry
> can i do with it?

Simpler input methods (dead keys and compose) are built into X. More
complex methods (e.g. those for CJK) use a separate IM server.

If your locale is for a Latin-based language, you should be able to
use dead keys and compose processing. For a UK keyboard, AltGr and the
rightmost keys (=[]#'/) normally act as dead keys, while Shift-AltGr
is Compose.

There is more information on the API in §13.5 of the Xlib manual.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list