Bug 197552

Summary: Shortcuts ignore keyboard layout
Product: [Frameworks and Libraries] kdelibs Reporter: Ben Boeckel <bugzilla.kde>
Component: shortcutsAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED UPSTREAM    
Severity: normal CC: derdominique, dhaumann, khatre
Priority: NOR    
Version: 4.2   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Unspecified   
URL: https://bugreports.qt-project.org/browse/QTBUG-32908
Latest Commit: Version Fixed In:

Description Ben Boeckel 2009-06-22 22:26:26 UTC
Version:            (using KDE 4.2.90)
Installed from:    Fedora RPMs

When using the colemak layout, shortcuts are still bound to the qwerty layout (so ctrl+alt+k is ctrl+alt+e when colemak is enabled). Shortcuts should either be bound to the keycode (in which it should be specified) or to what the keyboard layout specifies. I would rather the second since this is what is followed through VNC and it's a little weird having two different keys to do the same thing. This also affects single-key shortcuts (such as X or V in KMail or KNode).
Comment 1 Andreas Pakulat 2009-06-22 22:38:39 UTC
(In reply to comment #0)
> Version:            (using KDE 4.2.90)
> Installed from:    Fedora RPMs
> 
> When using the colemak layout, shortcuts are still bound to the qwerty layout
> (so ctrl+alt+k is ctrl+alt+e when colemak is enabled).

I'm not a keyboard expert, but AFAIK Qt simply gets X keyboard events which have a certain symbolic key in them. If that symbolic key is "e" even though you've pressed "k" on your keyboard, then your mapping in X11 keyboard config is broken.

Anyway, mapping from key presses to shortcuts is not done in KDE anyway, its Qt so you need to file a bug there.
Comment 2 Fabian 2011-06-26 21:34:19 UTC
Still not solved...

KDE 4.6.2
German environment
Kubuntu 11.4

Observation: Shortcut handler always takes first keyboard layout in list. No matter which one is actually active.

In my German KDE environment (QWERTZ keyboard layout), I added the German "Dvorak II" layout.
When choosing it, input in all application works good, but the shortcuts behave as described above: All KDE shortcuts (including Ctrl+z, Ctrl+c, Ctrl+v and those to start applications) still follow the old keyboard layout. Non-KDE-Applications and the menu shortcuts (&File, &Edit, &View, etc) work fine (matching the new keyboard layout).

Actually, the "shortcut-module" ("Kurzbefehle und Gestensteuerung" in the system settings) of KDE always seems to take the *first* in the list of keyboard layout, not necessarily the active one.

Steps to reproduce:
1. Configure your keyboard to have US (first) and German (second) keyboard layout (German and US have Z and Y position swapped)
2. Start "kate"
3. Type in some text
4. Press Ctrl+Z

Seems to be a duplicate of 274820, 272259, 176113 and maybe 154212
Comment 3 Dominik Haumann 2013-10-05 19:52:38 UTC
This is a Qt bug. Maybe it even was solved in the meantime, but it certainly exists again in Qt 4.8.5, see also https://bugreports.qt-project.org/browse/QTBUG-32908

Anyone with Qt 4.8.4 who can confirm that it works there?
Comment 4 Clément 2021-05-10 16:14:39 UTC
As of 2021, I believe this bug is still not solved (cf. https://unix.stackexchange.com/q/214273/101324 ). 

QMake version 3.1
Using Qt version 5.11.3 in /usr/lib/x86_64-linux-gnu