GNOME Bugzilla – Bug 96053
Compose key not working
Last modified: 2004-12-22 21:47:04 UTC
Compose key behaves in a strange manner. In my /usr/XFree86/lib/X11/locale/en_US.UTF-8/Compose, I added several lines for composing Korean Hangul Jamos as shown below(bugzilla running here appears to be broken with UTF-8 input so that you'll see garbage between quotation marks below even if you set the encoding to UTF-8 in your browser) <Multi_key> <U1100> <U1100> : "ᄁ" U1101 <Multi_key> <U01106> <U0110b> : "ᄝ" U111d <Multi_key> <U1107> <U110b> : "ᄫ" U112b <Multi_key> <U1107> <U1107> : "ᄈ" U1108 <Multi_key> <U1107> <U1107> <U110b> : "ᄬ" U112c I also have activated Xkb I've made for Korean input (available at http://jshin.net/i18n/korean/kor2v.xkb). This combination works fine with xedit. However, in gedit it doesn't work. Well, in gedit, most things work except that Compose-key doesn't work. I got a beep when I tried one of 'compose' sequences above. Strange is that 'compose A E' or 'compose a e' works just fine in both gedit and xedit. gedit was launched under en_US.UTF-8 locale so that Compose mechanism was for sure turned on as the fact that 'Compose a e' worked is not sufficient to prove that :-). I found that bug 93575 was filed for a similar problem, but it seems like it's Solaris-specific. Moreover, in that case, even 'compose a e' doesn't work while in my case 'compose a e' works but 'compose <U1107><U110b>' doesn't work. Therefore, I'm filing a new bug for this.
The Xlib compose tables are only used if the X Input Method input method is in use. Whether that is used or not depends on the locale ... it isn't used for en_US. You can force it on with 'export GTK_IM_MODULE=xim'
Isn't it the other way around? That is, when XIM is in use, Compose doesn't work because Compose is a simple XIM. At least, that's what I found with xedit. (strace shows that compose.dir and Compose file is not read at all if the locale is ko_KR.UTF-8 and XIM server is running). Anyway, following your suggestion, I set the env. variable GTK_IM_MODULES to xim and tried again. However, that didn't make any difference. Actually, I got an error message that 'Loading IM context type 'xim' failed' which is expected because the XIM I'm running cannot be accessible from non-Korean locale. Moreover, if Compose is not used at all, how come 'Compose a e' works while 'Compose <U11xx> <U11xx>' doesn't work? Note that both work with xedit so that there's no problem with Compose map. Am I missing something? Is there Gtk-built-in support for a small set of combinations like 'Compose a e'?
- Xlib compose handling is a built in X input method - In most locales, GTK+ doesn't use that, it uses (by default) GtkIMContextSimple, which has it's own compose tables. (Those tables are why compose ae works) - Maybe things didn't work because you set XMODIFIERS=@im=myim ? That would keep Xlib from using the built in compose method. - You can also change input method on the fly to "X Input Method" through the right click menu.
That was it. Thank you. By resetting XMODIFIERS, I was able to access X11 compose mechanism in both en_US.UTF-8 and ko_KR.UTF-8. As for Gtk-built-in compose mechanism, wouldn't it be nice to let users modify/change the built-in(compiled-in) table for GtkIMContextSimple without recompiling Gtk? Another thing is that if XIM specified via XMODIFIER variable fails to get loaded (when users select XIM) it may be handy to fall back to Compose-map based XIM.