Bug 1259675 - Keyboard shorcuts stop working after changing keyboard layout
Keyboard shorcuts stop working after changing keyboard layout
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qt (Show other bugs)
All Linux
high Severity high
: rc
: ---
Assigned To: Jan Grulich
Desktop QE
: ZStream
Depends On:
Blocks: 1203710 1293786 1297830 1313485 1321025
  Show dependency treegraph
Reported: 2015-09-03 06:40 EDT by Siteshwar Vashisht
Modified: 2016-11-03 21:27 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, changing the keyboard layout in an X Window environment caused custom keyboard shortcuts to stop working. This update fixes the underlying source code and thus ensures that keyboard shortcuts work as expected in the described situation.
Story Points: ---
Clone Of:
: 1293786 1321025 (view as bug list)
Last Closed: 2016-11-03 21:27:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test.c (473 bytes, text/plain)
2015-09-03 06:40 EDT, Siteshwar Vashisht
no flags Details
0001-Revert-QTBUG-15319-fix-shortcuts-with-secondary-Xkb-.patch (1.66 KB, patch)
2015-09-03 06:41 EDT, Siteshwar Vashisht
no flags Details | Diff

  None (edit)
Description Siteshwar Vashisht 2015-09-03 06:40:10 EDT
Created attachment 1069730 [details]

Description of problem:
Keyboard shorcuts stop working after changing keyboard layout

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Add below lines in /etc/X11/xorg.conf

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,ru(winkeys)"
        Option "XkbVariant" ","
        Option "XkbOptions" "grp:ctrl_shift_toggle"

2. Login to KDE
3. Compile attached program test.c
4. Run the program and press 'ALT - x', it should press the button.
5. Change keyboard layout by pressing Ctrl - Shift - k.
6. Press 'ALT - x' again.

Actual results:
Button is not pressed after changing keyboard layout.

Expected results:
Button should be pressed after changing keyboard layout.
Comment 1 Siteshwar Vashisht 2015-09-03 06:41:28 EDT
Created attachment 1069731 [details]

Backported patch from http://code.qt.io/cgit/qt/qt.git/commit/?id=0c03af0d4d928bdbb32b09eedb1dba3ce59e5278
Comment 3 Jan Grulich 2015-09-03 07:37:12 EDT
Unfortunately it's too late to get this fixed in RHEL 7.2, would need to wait probably for RHEL 7.3.
Comment 4 Siteshwar Vashisht 2015-12-15 01:22:25 EST
This bug is still reproducible if russian layout is used as primary keyboard layout. For e.g. with this xorg configuration :

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "ru,us"
        Option "XkbVariant" ","
        Option "XkbOptions" "grp:alt_shift_toggle"
Comment 5 Siteshwar Vashisht 2015-12-15 01:26:38 EST
From  my understanding this bug was never fixed in Qt4, however it was fixed in Qt5 with this change request https://codereview.qt-project.org/#/c/96993/
Comment 8 Jan Grulich 2016-01-19 03:53:32 EST
Granting dev_ack+, patch is available.
Comment 9 Jan Grulich 2016-03-24 05:42:02 EDT
Fixed in qt-4.8.5-12.el7.
Comment 18 errata-xmlrpc 2016-11-03 21:27:46 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.