Unable to use ctrl+shift+? shortcuts with keyboard layout switcher

You have a Linux distribution with Xorg and you have configured the keyboard layout switcher to use alt+shift to switch between languages. But once you do that, keyboard shortcuts that use alt+shift+<key> combinations cannot be used. The same could happen if you have selected ctrl+shift as a shortcut to change language which disables all ctrl+shift+<key> combinations.

Solution 1 – Easy and risky

You could use Norbert’s PPA:

Step 0: Find the version of your Xorg:

sudo Xorg -version

And check at this page that your version is supported.

If not, the update could be a wild ride and most probably you should not proceed if you are a beginner.

Step 1: Backup your files (you should always have a backup right?).

Step 2: perform a basic update:

sudo apt-get update
sudo apt-get dist-upgrade

Step 3: Check your system is stable.

Step 4: Use the PPA to update Xorg:

sudo add-apt-repository ppa:nrbrtx/xorg-hotkeys
sudo apt-get update
sudo apt-get dist-upgrade

Step 5: Reboot the computer.

Problem fixed!

Solution 2 – Harder but safer

Step 1: Enable “deb-src” sources (via software-properties-gtk)

Step 2: apply patch via terminal (change versions accordingly):

cd ~/Downloads
apt-get source xserver-xorg-core
cd xorg-server-1.19.6/
wget https://aur.archlinux.org/cgit/aur.git/plain/freedesktop-bug-865.patch?h=xorg-server-bug865 -O freedesktop-bug-865.patch
patch xkb/xkbActions.c < freedesktop-bug-865.patch
sudo apt-get install devscripts
sudo apt-get build-dep xserver-xorg-core
debuild -uc -us
sudo dpkg -i ../x*.deb

Step 3: reboot

Problem fixed!

Background

This is a terrible controversial bug.  For some unknown reason some people believe that you should not be able to use alt+shift for one operation and alt+shift+key for another. The specification has been badly designed and since specifications are not easy to change, this has caused a long term battle between whether things should stay as they are or a formal fix should take place.

Technically, this means that the code executes the operations  when the keys are pressed (and not released). So for example if you press alt and then shift, the operating system immediately changes language (since both alt+shift have been pressed) without waiting for you to either press another key for a three key combination or release them in order to change the language.

For me, it is a deal breaker and a no brainer. I would never use an operating system that does not support both combinations at the same time. At least, add a setting to the operating system and make it configurable. Either update the specification (specifications need patches too) or screw it.

The patch has been originally written by Kyak, whom whole humanity should thank.

(ok, i overreact)

References:

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s