Bug 343646

Summary: KF5 - Caps Lock layout switching leads to skipping the next key press
Product: [Plasma] plasmashell Reporter: Dmitry Kharitonov <haritonovd>
Component: generalAssignee: David Edmundson <kde>
Status: RESOLVED FIXED    
Severity: normal CC: a, bhush94, haritonovd
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugreports.qt.io/browse/QTBUG-34068
https://bugreports.qt.io/browse/QTCREATORBUG-9589
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitry Kharitonov 2015-02-01 08:48:08 UTC
I've selected Caps Lock as a switcher to another keyboard layout. 

After pressing Caps Lock in such apps as Konsole or Kate, the tray indicator switches to another layout, but the app doesn't react to the first key pressed after Caps Lock - no symbol is entered, Ctrl+C doesn't work etc. All subsequent characters are entered as they should.

This problem doesn't happen in 'standard' fields, i.e. KDE Menu search, Keyboard testing field, Plasma Widget search etc. or non-KDE apps (Firefox).

Reproducible: Always

Steps to Reproduce:
1. Enable KDE layout switching, add the 2nd layout
2. Select "Switching to next layout" > "Caps Lock"
3. Press Caps Lock in Konsole or Kate

Actual Results:  
Application doesn't react to the first key pressed after layout switching

Expected Results:  
Applications should react to first key pressed after Caps Lock, not the second one.

I'm using Konsole 3.0.1, KDE Frameworks 5.6.0, Kate 5.0.0.
Comment 1 Dmitry Kharitonov 2015-02-01 10:40:38 UTC
This bug may be related to Qt bug https://bugreports.qt.io/browse/QTBUG-34068, which was probably fixed in Qt 5.4.1 (https://codereview.qt-project.org/#/c/102007/). Unfortunately, Arch Linux uses 5.4.0.
Comment 2 Andrew Gaydenko 2015-02-14 20:33:24 UTC
Confirming - very annoying. And unexpected :)
Comment 3 Andrew Gaydenko 2015-02-14 20:40:15 UTC
More strictly - at my case I haven't configured layouts via system settings, rather I have an appropriate options in xorg conf file /etc/X11/xorg.conf.d/10-evdev.conf:

        Option "XkbLayout"  "us, ru"
        Option "XkbOptions" "grp:caps_toggle, grp_led:caps"

But with kate/konsole I have the same issue - first-after-switch char is ignored.

Additional small information: yes, kate and konsole are affected by the bug, but, say, yakuake (which, I guess, is based on the konsole) works as expected.
Comment 4 Dmitry Kharitonov 2015-02-24 20:15:50 UTC
It seems that this bug was fixed in Qt 5.4.1. Both Kate and Konsole work fine now.
Comment 5 David Edmundson 2015-02-24 20:36:00 UTC
Thanks for reporting back.