Keyboard layout switching problems and poll

@Norbert, great! Thank you for your efforts!
I confirm that this patch fixes the problem for me. I have just tested it in LO Writer in Ubuntu 18.04.
I use ‘Alt + Shift’ as keyboard layout switcher and, lately, the shortcut in LO Writer ‘Shift + Ctrl + Alt + V’ (yes, I used to use this shortcut regularly) hasn’t been working. Now, after update from this PPA, it works again as expected.


You could try to submit the patch as a Stable Release Update but it will almost certainly not be accepted because Xorg is such a critical part of the OS. Nice one on requesting it for Debian 10, I’m guessing that it’s too late for Ubuntu 18.04 but we’ll have to see what Debian make of it because if they accept it soon then it’ll be in Ubuntu 18.10…

It’s not perfect. But It never was and Ubuntu carried it for 5 years. Alternate solutions has been declined on upstream as well. They are very stubborn.

My issue is key press vs key release. Ubuntu carried the xorg patch mentioned above since 12.04. Then they dropped during 17.10 because it didn’t apply correctly. However Arch has updated the patch (even on upstream) and @Norbert is using it. I don’t see any reason why it can’t go in Ubuntu as FFE as of now or as SRU later. It actually solves couple of shortcuts issue in Unity too. @jbicha ?


The main issue is that when you’re using combinations like ctrl+shift+f this combination works fine, but also changes keyboard layout. Ubuntu 18.04

Right. I think the nature of the issue is described previously in this thread.


Thank you for compliments and your efforts on our local forum :slight_smile:
Nice to meet you in this community!

@nick-denizhenko , @gunnarhj

The patched packages (with patch from AUR) was tested and work great in:

  • Ubuntu 16.04 LTS (with HWE) - Unity, MATE, Xfce;
  • Ubuntu 18.04 LTS - KDE, MATE, Xfce.

I completely do not care about GNOME, I even not tested patched packages with it.
GNOME “developers” break normal classic user experience, so I ignore them.

I can’t fix the patch, because I’m not an author of it.

If you guys are so clever, you can ask support here, or on Xorg (and wait another 5-10 years), or on IRC, and write your own pretty good nice patch.
You can also patch GNOME Shell, Mutter, Metacity, Compiz and whole Xorg stack if GNOME fails for you.

I need to do my main work, I do it in MATE DE.
So I made my life easier with packages from my PPA.
Now I can use MATE on 16.04 LTS (with HWE) and 18.04 LTS. Nothing more.

If my packages do not help you - you can always remove the PPA with

sudo ppa-purge ppa:nrbrtx/xorg-hotkeys

and continue to use your desktop as before.


CapsLock is the most simplest key for changing layout when you want to work with both hand while writing a mixed text of two language. Actually CapsLock does not use to its main function because people barely write with a lot of bold words and using shift for occasionally one letter is very common,

Yet CapsLock does not seem to be configurable for this task for me on 18.04.1. It did work on 17.10 Does it work for you? If it does what is your setup?

replying to myself - after the application of the suggested patches I have managed to configure CapsLock to work - Put the “CapsLock behaviour” in “Advanced Layout Options” into “disabled” (not “CapsLock disabled” which is another setting available there, sic!) And then went to dock icon keyboard layout settings and just set CapsLock in “Switch to next source using”
I have also activated “Show Extended Input Sources” but not sure if that’s required.

No, it does not. I switched to ubuntu-mate because of this problem. I do not think I will ever come back to ubuntu main distro.


Thank you @Norbert for reporting this issue and for providing a solution. I have noticed the same issue on Ubuntu 18.04 Unity and I’m going to try your patches.

1 Like

Unfortunately, @Norbert’s solution doesn’t fix my problem with the language switching shortcuts on Ubuntu 18.04 Unity.

1 Like

@kkomelin I can reproduce your issue on clean Ubuntu 18.04 LTS with Unity (ubuntu-unity-desktop) desktop. Thanks for testing!
I’m not an author of the patch. I just packaged it.

So we need some official reaction from Unity developers (and from GNOME too).

As I wrote above I can’t do more (with all respect to the Unity team).

I have a similar problem: after upgrading 16.04 to 18.04, custom keyboard shortcuts no longer work, also language layout switch shortcut doesn’t work. I have several keyboard shortcuts to launch certain programs, they are set up in Keyboard > Shortcuts > Custom Shortcuts and completely ignored currently. For language layout switching, I tried “tweaks” app, also the solution with custom ppa above, nothing seems to help :frowning: it’s really disheartening.

I’m using Unity, not the default GNOME - the header takes up room for no reason in gnome and there’s no way to get rid of it, so I’m sticking with Unity… I really hope the keyboard shortcuts can be fixed.

One weird thing I noticed is that when I click on current language indicator in the top bar and then Keyboard Layout Chart, the keyboard layout window changes Shift background to orange when I press it, and Alt background to orange when I press Alt, but when I press Alt and then Shift (the way I switch between languages), the orange background disappears on Alt after pressing Shift. For Ctrl+Shift it works as expected - i.e. both are highlighted, but Alt+Shift shows no highlight… I will really appreciate help fixing the shortcuts, I can’t really work without them and I’m considering downgrading back to 16.04 (I keep asking myself why I upgraded, everything worked perfectly!)

This seems to be a request for support rather than a contribution to the development of Ubuntu. I’d recommend that you ask a question at Ask Ubuntu or at some other of the available support resources.

The original question was of the same nature…

Anyway, I solved the problem by disabling Commands in CompizConfig Settings Manager.

1 Like

You (developers of Ubuntu, GNOME, whatever) break things and make life of users harder.

We (users) want you (developers) to fix all errors on system-wide level by coordination of your efforts here.

I can’t understand how and where we (users) can ask you (developers) for the support with success.
On Launchpad the triaging process is slow, here you do not want to react, on IRC you do not react.
Where should we write our opinions and complains about this case (keyboard layout switching)?
Did you misunderstood something - we are using commercially supported Linux distribution, not bleeding edge self-breaking ArchLinux or LFS. We expect that things will be fixed here in Ubuntu or in upstream.

AskUbuntu is an resource for posting quick fixes and solutions. According to its reputation leagues 0.6 million of its users (96.3%) are newbies. Are you sure that they can fix such issues?
On AskUbuntu such questions will be marked as off-topic very likely and very fast (they will consider such questions as bug-report).

We already have my high-rated answer on AskUbuntu about current problem.
But it is a hack, and it can’t heal keyboard problems in GNOME sHell and beloved Unity.


Great that you found a solution, @leschinsky.

@Norbert: You are aware of the difference between support and bug fixing/development, aren’t you? The Xorg issue you highlighted higher up in this thread is a valid feature request which you have called the developers’ attention to both via bug reports and here. But please note that there are a lot of keyboard shortcut and layout switching issues which are not related to that. Often a helping hand in some support forum is sufficient. There are a lot of such questions/answers at Ask Ubuntu, for instance.


Unfortunately this fix only works until reboot :frowning: Currently I have to manually do this (launch CompizConfig Settings Manager and enable/disable Commands or any other feature - it reloads the top bar and the Dash, and keyboard shortcuts work after that. Another way is to run compiz --replace from Terminal - but again, this has to be done manually, I spent hours trying to make this automatic on reboot by adding to startup application or other places, but nothing seems to work - when executed from startup applications, it actually breaks the UI, there’s no header and no dash after executing this way. Why is that, any ideas? I also tried adding a shortcut to desktop, but double-clicking it on desktop has the same effect - broken UI. If, on the other hand, I run the same command by double-clicking from Files (Nautilus), it works! Why? It’s so frustrating…

Even after “fixing” it by running compiz --replace, it’s still not perfect - in WebStorm I cannot use my Alt+Shift+F7 shortcut anymore - the language switches, I guess because I pressed Alt+Shift, and F7 is ignored.

I really shouldn’t have upgraded… I need some painkillers now :wink:

1 Like

Sorry to hear that, but please understand that this is not the place to get help with the configuration of your machine.