« Air Canada's bug letter | Home | 父子は »

Solved: Compose key doesn't work with SCIM, anthy, and Xorg

Mon 31 Oct 2011 by mskala Tags used: ,

Posting this for the benefit of people who may have the same problem, and for my own future reference if it happens to me again.

The problem: Xorg (new name for XFree86) installation, configured with SCIM-anthy for Japanese-language input, and I want to also use the Windows keys as Compose keys when not in Japanese input mode. Compose and Japanese input both work in GTK applications, but in QT applications (notably, Konsole), Japanese input works and the Compose key doesn't. The Compose key is properly configured in KDE, xorg.conf (XkbOptions setting and UTF-8 locale), and xmodmap. If I disable SCIM entirely, then Compose works everywhere, but I lose Japanese input everywhere also.

I solved this problem once before, but after several configuration changes it showed up again, I wasn't sure which config change was at fault, and it wasn't easy to roll back some of them.

The solution: in SCIM Setup/IMEngine/Global Setup/Other, enable the "English/European" input mode in the SCIM configuration. It only needs to exist on the list of modes enabled for possible use; it's not necessary to actually activate SCIM with Ctrl-Space and choose that mode to use the Compose key. When this mode is enabled, it replaces the former default "English/Keyboard" mode on the list (I think that means SCIM's English/European is actually in effect even when SCIM is not popped up), and Compose works everywhere that Japanese input works (which, on my system, is everywhere). ETA: Okay, on my laptop it replaces English/Keyboard. On my desktop, it appears in addition to English/Keyboard. Strange, but since it still basically works, I'm not going to mess with it.

It appears that what's happening is that SCIM, whenever it's loaded but regardless of whether it's activated, intercepts all keyboard input that would go to QT applications, and as a result it overrides the standard KDE, Xorg, and xmodmap Compose mechanisms. It provides a Compose key mapping of its own, but that isn't a setting you can turn on and off as a separate feature; it just becomes available by default when "English/European" is configured. Whatever interception SCIM does is less intrusive in the case of GTK applications, so for those, the Compose key configured through other means remains available. It's reasonable to guess that this will mean the Compose key's mapping tables may be different in the two contexts, and I have heard some complaints about SCIM's Compose mappings not being as configurable as people would like, but that hasn't been a problem for me yet; I just wanted it to work basically at all, and so far I've had no problems with the default tables and haven't noticed a difference between the contexts.

1 comment

anonymous
Oh my god I love you and you probably just saved me from buying a mac out of frustration. anonymous - 2012-08-01 20:25


(optional field)
(optional field)
Answer "bonobo" here to fight spam. ここに「bonobo」を答えてください。SPAMを退治しましょう!
I reserve the right to delete or edit comments in any way and for any reason.