[Uim] Re: GTK+ compose table (bug #377808)

Etsushi Kato ek.kato at gmail.com
Tue Sep 5 18:22:04 EEST 2006


On 9/4/06, Jan Willem Stumpel <jstumpel at planet.nl> wrote:

> I started uim by typing
> uim-xim&
> uim-gtk-toolbar&
>
> In the environment I have
> XMODIFIERS=@im=uim
> GTK_IM_MODULE=uim
>
> Maybe this is not the right way to start it. Perhaps you could
> tell me what I did wrong.
>
> Now uim works (e.g. I can select anthy) in xterms and in
> Openoffice, but *not* in gtk apps like Bluefish and Mozilla. So
> unfortunately I cannot test it. But apparently the bug submitter
> could.

To use GTK+ immodule installed in /usr/local, please check
your /etc/gtk-2.0/gtk.immodules file (or equivalent) to have
"/usr/local/lib/gtk-2.0/2.*.0/immodules/im-uim.so"
(which can be generated with gtk-query-immodules-2.0).


Anyway back to Compose...

> However, I think the following is the matter:
>
> gtk's own compose mechanism is not just (as I thought first) a
> subset of the X11 compose mechanism.

Right.  I also noticed this after the bug report.

> There are also Compose
> sequences which are in gtk, but not in X11/Compose, like "Compose
> o slash". Another example is å (often used in Danish), which in
> gtk is made by "Compose a a". In X/Compose it is made by "Compose
> o a". So I suppose a Danish user who is used to "Compose a a"
> (this would have to be a user who never used Openoffice or xterm
> apps!) will be surprised when confronted with the "standard"
> X/Compose method. Some other things are different too. E.g. in
> X/Compose, "Compose _ a" is ā, but in gtk it is ª.

OK.

> The gtk compose table is in the file gtkimcontextsimple.c in the
> source code of gtk. See the comments in that file. There it also
> says that the gtk compose file was generated from the Compose file
> of XFree86 4.0. So any Compose sequences which have been added
> later (presumably they include things like ŭ, ᾇ, etc.) are
> not available in gtk.

So GTK+ lacks some of the sequences which X11 has, and has
some extra sequences like "Compose a a", and even has
contradicted sequences.

> IMHO it would be best if all applications on a Linux system would
> use (or appear to use) the same Compose sequences, i.e. of the
> X11/Compose mechanism, with possibility of customization in
> ~/.XCompose. But this will surprise users who have only been using
> gtk apps, like the bug submitter seems to be. Several approaches
> are possible:
>
> 1- Not change anything. This means that uim just says "bad luck
>     for you. Just learn the standard Linux way of keyboard input".
>     In principle, I think this would be the best. Why does gtk have
>     its own system anyway? For "Windows compatibility"? But Windows
>     does not use a Compose key normally.
> 2- Add a new input method called "direct(gtk)" which would use the
>     gtk compose mechanism.
> 3- Determine the exact set of compose sequences which are in gtk
>     but not in X/Compose. This set is probably not very big.
>     Arrange for uim to understand them (if they do not conflict
>     with X/Compose; in cases like ª/ā a choice must be made). It
>     could perhaps be done by patching the X Compose file.
>
> But I think 1) would be the best.

#1 or #3 would be fine.

And I'm now thinking about #3 (though having trables with some
contradicted sequences as you described...) and asking xorg about
the existence of the standard specification about Compose
sequence on X desktop at
http://lists.freedesktop.org/archives/xorg/2006-September/017874.html,
but have got no response yet...

Cheers,
-- 
Etsushi Kato
ek.kato at gmail.com


More information about the uim mailing list