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

Jan Willem Stumpel jstumpel at planet.nl
Mon Sep 4 17:15:15 EEST 2006


Etsushi Kato wrote:
> Hi,
> 
> Today I've got a bug report about Compose key that some of the
> sequences used in internal GTK+ is not available in uim-1.2.x
> (https://bugs.freedesktop.org/show_bug.cgi?id=8118).
> 
> [..]

> What is your opinion about the default compose table for uim's GTK+ 
> immodule?

Only today I tried to test 1.2.1. Debian still does not have a
package in unstable, so I tried to compile it myself (installed in
/usr/local), with config result:

    Anthy           : yes
    Canna           : no
    Mana            : no
    PRIME           : no
    m17n-lib        : yes
    SCIM            : no
    Gtk+            : yes
    Gnome Applet    : no
    Qt              : no
    Qt immodule     : no
    FEP             : yes
    Emacs           : yes
    XIM             : yes
    Pref            : yes
    DICT            : no
    EB              : no
    libedit         : no
    Default toolkit : gtk

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.

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. 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 ª.

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.

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.

Regards, Jan



More information about the uim mailing list