Bugzilla – Bug 869133
[ibus] Dead keys produce incorrect results in non-Qt applications
Last modified: 2016-05-30 14:13:10 UTC
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24 I use a keyboard layout which uses dead keys to produce accented characters. In all Qt and KDE applications (Konsole, Kwrite, Skype, Clementine, etc.) the dead keys work as expected. However, in every non-Qt application I've tried (LibreOffice, Eclipse, gedit, etc.), some (but not all) dead key combinations produce incorrect results. For example, my XKB symbol map includes the following line: key <AD01> { [ apostrophe, quotedbl, dead_acute, dead_diaeresis ] }; So if I press AltGr+' e I expect to get é, and if I press AltGr+' c I expect to get ć. However, only the first of these works in non-KDE applications. When I type AltGr+' c elsewhere, I get ç! Reproducible: Always Steps to Reproduce: 1. Switch to a keyboard map which binds dead_acute to AltGr+' 2. Type AltGr+' c in a non-Qt application. Actual Results: ç Expected Results: ć Possibly related to Bug 817940, which is another problem with dead keys. (Though in that case the dead keys aren't working at all; in my case they are working but producing incorrect results.)
A similar problem was reported for Fedora: <https://bugzilla.redhat.com/show_bug.cgi?id=917130> See in particular the comments, which extensively discuss the ç versus ć example. The problem is something to do with ibus using a different locale than that desired by the user. On my openSUSE 13.1 system, for some locales in /usr/share/X11/locale, dead acute + c is set to produce ccedilla, and for others it is set to produce cacute: [/usr/share/X11/locale]$ grep '^<dead_acute> <c>' */*Compose en_US.UTF-8/Compose:<dead_acute> <c> : "ć" U0107 # LATIN SMALL LETTER C WITH ACUTE fi_FI.UTF-8/Compose:<dead_acute> <c> : "ć" # LATIN SMALL LETTER C WITH ACUTE iso8859-13/Compose:<dead_acute> <c> : "\343" cacute iso8859-15/Compose:<dead_acute> <c> : "\347" ccedilla iso8859-1/Compose:<dead_acute> <c> : "\347" ccedilla iso8859-2/Compose:<dead_acute> <c> : "\346" cacute pt_BR.UTF-8/Compose:<dead_acute> <c> : "ç" ccedilla # LATIN SMALL LETTER C WITH CEDILLA [/usr/share/X11/locale]$ However, AFAIK my locale isn't set to pt_BR or any of the other locales which produce ccedilla: $ set|fgrep en_ LANG=en_CA.utf8 LANGUAGE=en_CA:en_GB:en_US:en LC_MESSAGES=en_CA.UTF-8 So I don't understand why ibus would want to produce ccedilla instead of cacute. Has openSUSE 13.1 configured ibus to run with some locale other than the system default?
I can no longer reproduce this problem in LibreOffice. Now LibreOffice doesn't respond to dead keys at all unless I unset XMODIFIERS before launching it. If I do unset XMODIFIERS, then dead keys in LibreOffice work as expected for me (e.g., AltGr+' c produces ć, not ç). The problem can still be reproduced in other non-Qt applications (SeaMonkey, Eclipse, GNOME applications, etc.). For these unsetting XMODIFIERS has no effect.
This is more an ibus problem. Reassigning. What does 'echo $XMODIFIERS' say before you unset it?
The bug has mutated again since my last post. As of around October 2014, dead keys are *generally* working once again in LibreOffice. However, in LibreOffice, and in all other non-Qt applications, AltGr+' c still produces ç instead of ć as expected. To answer your question, $ echo $XMODIFIERS @im=ibus Unsetting XMODIFIERS before launching LibreOffice no longer fixes the problem. Further information is available on this LibreOffice bug report: https://bugs.documentfoundation.org/show_bug.cgi?id=71437
Please show information that is necessary for IM debugging: The values of the following environment variables - QT_IM_MODULE - GTK_IM_MODULE - XMODIFIERS You can get them by running $ env | grep -i im Which UI binding of LibreOffice do you use? - libreoffice-kde4: use the IM specified by XMODIFIERS - libreoffice-gtk: use the IM specified by GTK_IM_MODULE - libreoffice-x11: use the IM specified by XMODIFIERS You can manually select one of them by "OOO_FORCE_DESKTOP"
My environment variables: QT_IM_MODULE=ibus XMODIFIERS=@im=ibus GTK_IM_MODULE=ibus I have libreoffice-kde4 installed (and not libreoffice-gtk3) but for some reason my OOO_FORCE_DESKTOP is set to "gnome" by default. Changing it to "kde" has no effect on the dead keys behaviour. Changing it to "x11" or unsetting it causes dead keys to stop working altogether.
This problem seems to be related to: - https://bugs.launchpad.net/ubuntu/+source/ibus/+bug/518056 - https://code.google.com/p/ibus/issues/detail?id=1777 - https://github.com/ibus/ibus/commit/7ae585ac21db4dfac8989887e1a5f97fb863fa17 Old ibus does not follow /user/share/X11/locale/* but the latest version load dynamically those files depending on the current locale. Moreover, the latest one can load custom compose rule from ~/.XCompose. Can you try the latest version from M17N repository? Test on Leap 42.1? Then, what happens if your LANG is "en_US.UTF-8"? Please also make sure that ibus-ui-gkt3 is installed. > for some reason my OOO_FORCE_DESKTOP is set to "gnome" by default. openSUSE's ibus launch script does so because IM support by lo-kde4 is limited. > Changing it to "kde" has no effect on the dead keys behaviour try OOO_FORCE_DESKTOP=kde4 instead of "kde". If you don't use the feature of IBus and GNOME, you can disable it by setting INPUT_METHOD=none.
(In reply to Fuminobu Takeyama from comment #7) > Can you try the latest version from M17N repository? Test on Leap 42.1? I'm not running Leap, though I might install it later if I have time. In the meantime I've installed the latest ibus packages (and all other system packages) from M17N on openSUSE 13.2. > Please also make sure that ibus-ui-gkt3 is installed. There's no such package. Do you mean perhaps ibus-gtk3? If so, yes, I've always had that installed. With the new ibus packges from M17N, AltGr+' c produces ć as expected. (This is with my usual LANG=en_CA.utf8.) > Then, what happens if your LANG is "en_US.UTF-8"? It also works properly now with LANG=en_US.UTF-8. > > for some reason my OOO_FORCE_DESKTOP is set to "gnome" by default. > openSUSE's ibus launch script does so because IM support by lo-kde4 is > limited. > > > Changing it to "kde" has no effect on the dead keys behaviour > try OOO_FORCE_DESKTOP=kde4 instead of "kde". It also works properly now with OOO_FORCE_DESKTOP=kde4.
Oh, I should confirm that with the M17N versions of ibus, dead keys are working as expected in all non-Qt applications I tried, not just LibreOffice.
already resolved in Leap 42.1