Bug 1259675

Summary: Keyboard shorcuts stop working after changing keyboard layout
Product: Red Hat Enterprise Linux 7 Reporter: Siteshwar Vashisht <svashisht>
Component: qtAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.1CC: alanm, ashishks, jherrman, jkurik, pgeorgie, svashisht, tpelka
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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) Environment:
Last Closed: 2016-11-04 01:27:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1293786, 1297830, 1313485, 1321025    
Attachments:
Description Flags
test.c
none
0001-Revert-QTBUG-15319-fix-shortcuts-with-secondary-Xkb-.patch none

Description Siteshwar Vashisht 2015-09-03 10:40:10 UTC
Created attachment 1069730 [details]
test.c

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

Version-Release number of selected component (if applicable):
qt-x11-4.8.5-8.el7.x86_64
qt-4.8.5-8.el7.x86_64

How reproducible:
Always

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"
EndSection

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 10:41:28 UTC
Created attachment 1069731 [details]
0001-Revert-QTBUG-15319-fix-shortcuts-with-secondary-Xkb-.patch

Backported patch from http://code.qt.io/cgit/qt/qt.git/commit/?id=0c03af0d4d928bdbb32b09eedb1dba3ce59e5278

Comment 3 Jan Grulich 2015-09-03 11:37:12 UTC
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 06:22:25 UTC
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"
EndSection

Comment 5 Siteshwar Vashisht 2015-12-15 06:26:38 UTC
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 08:53:32 UTC
Granting dev_ack+, patch is available.

Comment 9 Jan Grulich 2016-03-24 09:42:02 UTC
Fixed in qt-4.8.5-12.el7.

Comment 18 errata-xmlrpc 2016-11-04 01:27:46 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-2236.html