Bug 338981

Summary: Keyboard layout switcher stops working when certain window gets focus
Product: [Unmaintained] kxkb Reporter: Sergey <kde.org>
Component: generalAssignee: Andriy Rysin <arysin>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: kde.org, nate
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sergey 2014-09-10 16:15:07 UTC
Hi all,

This probably should be classified as the kded bug (which I think tries to look as a feature).

That looks similar enough to few previous bugs those have been resolved/fixed a year or longer ago, i.e. Bug 295438, or Bug 303578. Nonetheless, the effect is still alive.

I have freshly installed KDE 4.12.5 from the FreeBSD 10.0-RELEASE-p7 ports. I really need Cyrillic keyboard and hence have added the "Russian (phonetic)" layout. Switch key for now is "Menu" though that does not matter. On the other hand I do not need translation from English for the menus, docs, etc, so I haven't bothered to get a localized KDE.

The keyboard worked just fine for both English and Cyrillic (both are UTF-8) and suddenly stopped.

A small investigation discovered the switcher stops working every time when I  activate a window from Mozilla (either Firefox or Thinderbird) or (what's worse) of Pidgin.

The kded4 writes a message:
X11Helper::getCurrentLayout: Current group number 1 is outside of current layout list ("us") 
and stops any switching forever, leaving just the "US".

It is possible to get the switching back if you open the Layout settings of KDE, hit "Configure layouts", "Apply" and once again, "Configure layouts" and "Apply".

It can be fixed for a given application if you put a locale explicitly when starting it, i.e. put
 LC_ALL=ru_RU.UTF-8 pidgin
instead of mere
 pidgin
in the "KDE Menu Editor"

I have the locale "ru_RU.UTF-8" set for my login and locale "C" for root.

For now it looks funny enough, but it did not look so when I spent almost a day with an US-only keyboard...
Comment 1 Sergey 2014-09-11 12:30:02 UTC
Update:  The locale setting works with Pidgin and does not work with either Firefox or Thunderbird...
Comment 2 Andriy Rysin 2014-09-11 13:30:44 UTC
Looks like something outside of kded is resetting your keyboard layouts.
Could you please check if you have ibus running/installed? If yes I would suggest to remove it and see if that helps (it did for some people with similar problem)
Comment 3 Sergey 2014-09-11 14:50:27 UTC
(In reply to Andriy Rysin from comment #2)
> Looks like something outside of kded is resetting your keyboard layouts.
> Could you please check if you have ibus running/installed? If yes I would
> suggest to remove it and see if that helps (it did for some people with
> similar problem)

You are quite right!!!!  That helps. Thank you!

Does ibus-daemon provide anything else useful except that kbd problem?
Comment 4 Christoph Feck 2014-09-11 21:32:38 UTC
X11 input methods are used to enter east-asian scripts using western keyboards. If you do not use such input methods, you can safely remove ibus.
Comment 5 Andrew Crouthamel 2018-11-12 02:56:05 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Andrew Crouthamel 2018-11-21 04:39:30 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Nate Graham 2021-03-20 04:55:16 UTC
Ibus messing it up. :(