Comment #44 on issue 526 by [email protected]: Dead keys (^`~ etc) don't work in XIM programs
http://code.google.com/p/ibus/issues/detail?id=526
I did some extensive research this last week into the problem of iBus and dead keys, and have discovered a few things. First, the dead key issue with XIM and iBus is not peculiar to iBus. Almost all other XIM input methods (fcitx, xsunpinyin, unikey, nabi) exhibit exactly the same behaviour with dead keys. The only two that do not (uim, scim) have extensive code that basically reimplements a small subset of XKB to support some European keyboards. The problem is with XIM itself. There seems to be a bug in XIM that dead keys do not work if a client connects to an XIM server even if the input method is disabled. XIM can operate in two modes, dynamic and static. In static mode, all keys presses are sent to XIM server for processing and the XIM server cannot be disabled. In dynamic mode, the XIM server sets up a hot key, and key presses are only sent to the XIM server if the hot key is first pressed to enable the input method. If the hot key is not pressed, then the XIM server never sees the key presses. The interesting thing is that even when the input method is not enabled by the hot key, dead keys do not work. Since the XIM server never comes into play, this shows that the bug is not with servers (like iBus) but with XIM itself. Since the XIM server never sees the key presses, no amount can be done to the XIM server (aka ibus) in dynamic mode, to make dead keys work.
The way scim and uim get around this is that they work in XIM static mode, so that all key presses are processed by scim and uim. XKB like behaviour is implemented to support European keys when all other scim or uim keyboards are disabled. This a band-aid approach at best. The implementations always assumes that, for example, deadkey_acute followed by "a" will always produce an "á". If you were to create an xkb keyboard so that a deadkey_acute followed by "a" would produce a greek small alpha with psili (ἀ) it would not work with scim or uim. The real solution is to fix XIM so that dead keys are processed correctly when XIM is disabled and this involves debugging and modifying the xorg server.
-- You received this message because you are subscribed to the Google Groups "ibus-devel" group. iBus project web page: http://code.google.com/p/ibus/ iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
