Kaixo!

On Sun, Feb 20, 2005 at 12:51:40PM +0000, Simos Xenitellis wrote:

> Input methods are like black magic to me. Please tell me if the following are 
> correct! :)

All you said is correct.

In fact there are three kind of input methods, they all need some
level of support from the application/toolkit:

1) XKB: it's the simplest, so the easiest and almost universally
implemented  (it requires using one of X{mb,wc,utf8}LookupString,
the only cases were it is not the case is often because the application
does not want to let X11 handle the input (it's the case of WINE,
that just want to know what key has been pressed, and interpret it
trough it's own windows keyboard driver emulation).
so if it is possible to use it, is often better (I prefer it over
the default "cedilla" input method of gtk for example, which is
comparatively extremely limited)

2) the full blown X input methods, that is an external process,
defining an XMODIFIERS="@im=.....". It is very complex to program,
as the X11 protocol dealing with that is very complex; other than
having to develop the input method server, it is also needed to
includ complex code in the application itself (gtk and Qt implement
it in the toolkit and a programmer writting a standard programs using
those toolkits don't have to care, but other toolkits may require
the programmer to do it).
In fact it is so complex and behaviour may be inconsistent from one
program/toolkit to another than it has never been largely used with
the exception of languages that were absolutely forced to do it
(Chinese, Japanese, Korean).

3) the complexity of the X11 input method and the grow in use of
gtk/qt toolkits made some people want to solve it at the toolkit
level as X11 wasn't able to do it (same as for complex text rendering
btw), and so gtk2 appeared with gtk-specific input methods, but
that work only for gtk2 programs, it is a step forwared from XIM,
as it is much easier to write such input methods, and a plethora
of them blossomed; but it is a step backward as inconsitency
in input has been introduced (now your input behaviour may
be different in gtk, qt or others, eg between gimp, kmail and xterm).
not that gtk wasn't the first one to implent that way of doing,
the first was "yudit", but it was a single application.


Was is badly needed now is a toolkit-neutral interface standard
for interfacing input method engines so that there is an
easy way to write simple ones (like for polytonic greek which
needs only a very simple logic) and still have them work
everywhere and not having a big gtk/qt/others trichotomy.
(in and ideal worls the "right-click->input method" menu should
be identic in gimp, kmail and xterm, and it should maybe even
keep track of a global input method choice (or maybe not,
both opinions (global or window-specific state) have pros and cons))

What is maybe a bit misleading in the gtk input methods menu
is that the "X11 input method" needs to be used to use the
simple composing system with dead keys and compose key, not
just only for complex CJK input methods.

If you want it by default, you can put a line

export GTK_IM_MODULE=xim

in your ~/.profile

-- 
Ki �a vos v�ye b�n,
Pablo Saratxaga

http://chanae.walon.org/pablo/          PGP Key available, key ID: 0xD9B85466
[you can write me in Walloon, Spanish, French, English, Catalan or Esperanto]
[min povas skribi en valona, esperanta, angla aux latinidaj lingvoj]

Attachment: pgpeyjgvY94Qq.pgp
Description: PGP signature

Reply via email to