Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The problem after a recent update in my Ubuntu 13.10 with Unity.

When typing something in Qt Creator 3.0.1 or in my own program compiled with Qt 5.2.1 (from, I can't change keyboard layout. For example, if current layout was En when I launched the program, then only English letters will be typed in it, even if I switch to Russian language. If I press Alt+Shift, the tray icon does change from En to Ru, and it applies to most programs but not to some Qt programs. To change layout, I have to relaunch program or to use copy-paste from an input field in another program!

Not all Qt programs have this problem — for example, KDevelop doesn't.

Upgrading Ubuntu from 13.10 to 14.04 beta didn't solve this problem (while it fixed another bug, influencing shortcuts in Russian layout in LibreOffice).

What can cause this strange behavior?

share|improve this question
Could you list more qt app which works and which having same problem? May be there is something common between them. (KDevelop build using KDE dev libs which are higher then Qt libs). Alse could add output of env | grep -i im – Sneetsher May 1 '14 at 7:28

It looks like it's a bug in Qt's event handling system for changing keynoard layout: bugzilla link.

Gatis Paeglis added a comment - 03/Dec/13 1:47 PM This is not a bug in Qt as suggested by a developer in The same resource suggests that the cause of the issue is that Qt doesn't listen for XkbNewKeyboardNotify events - this is wrong. XkbNewKeyboardNotify has nothing to do with keyboard layout changes. XkbNewKeyboardNotify event is fired when the actual hardware gets connected or disconnected, not when the keyboard layout changes. The actual issue is in Xlib as suggested in and in We can hope that one day xcb platform plugin won't need dependencies to Xlib anymore, which will allows us to use xcb event loop directly. This should also solve the "keyboard layout detection" issue. Here is the discussion about Xlib dependency in xcb plugin

As it's said, it affects only GTK based desktop enviroments, so you may want to swich to KDE. You can do it this way:

sudo apt-get install kubuntu-desktop
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.