1. Set up three keyboard layouts, say, English, Ukrainian(winkeys) and Russian 2. Enable spare layouts with 2 main layouts 3. Set up keyboard shortcuts for each particular language Expected behavior: the main layout switch key toggles between English and another language. I can press the shortcut for a particular language to specify which of the two Slavic languages should be paired with English for the time being. Actual behavior: Cryptic. The shortcut for English works most of the time. When the main layouts are English and Russian, everything works. But when the main layouts are English and Ukrainian, the shortcuts for Russian and Ukrainian are swapped. If I press the shortcuts too often, they sometimes deviate from the above in unpredictable ways. KDE 5.22.5 (Ubuntu 21.10) This is a regression, 5.21.4 (Ubuntu 21.04) worked fine.
Can you upgrade to Plasma 5.23? Some issues with the keyboard shortcuts were addressed there.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
You mentioned spare layout, are you running X11? Wayland session doesn't support spare layouts yet.
Unfortunately, no luck with 5.23.3 from ppa:kubuntu-ppa/backports. Behavior is still exactly the same. Yes, X11.
I can guess what's happening - if we use spare layout first time, we change theirs order. But the shortcuts do know nothing about it, and continue behave as if the order was the same. Here you got the swapping. Does it look possible? Need to see if we can correct the shortcuts as well..
(In reply to Andrey from comment #5) > I can guess what's happening - if we use spare layout first time, we change > theirs order. > But the shortcuts do know nothing about it, and continue behave as if the > order was the same. > Here you got the swapping. > Does it look possible? Well spotted. If I have English, Russian, Ukrainian, in that order, then activating Ukrainian switches the order to EN—UK—RU and, if the shortcuts are tied to the position of the layout on the list instead of the layout itself, that would cause the problem. What changed since 5.21.4, where things worked well?
In 5.21.4 we had old layouts widget maybe? They look a bit different, if you trouble to compare I can check for sure.
The fix is ongoing, meanwhile, could someone confirm https://bugs.kde.org/show_bug.cgi?id=459098?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1148
Git commit 02325c521066eb0afd5f2656093e71ce46ae2538 by Andrey Butirsky. Committed on 16/09/2022 at 23:21. Pushed by butirsky into branch 'master'. fix: Keyboard layout shortcuts activate wrong language Fixes spare layout's shortcuts activating wrong layout after first use, see the bug for the details. When we switch to a spare layout (by the shortcuts or via applet's menu), rearrangement of layouts happen - the spare one become the last in the main loop, preempting the previous one on it's place. Layouts-specific shortcut actions activate the layout by index which is hold in the action's data. Thus, the indexes should be adjusted accordingly. M +25 -2 kcms/keyboard/keyboard_daemon.cpp https://invent.kde.org/plasma/plasma-desktop/commit/02325c521066eb0afd5f2656093e71ce46ae2538
Git commit 2cb9201be1e3a3f3d8f8a040de19b6a5a7827538 by Andrey Butirsky. Committed on 16/09/2022 at 23:22. Pushed by butirsky into branch 'Plasma/5.26'. fix: Keyboard layout shortcuts activate wrong language Fixes spare layout's shortcuts activating wrong layout after the first use, see the bug for the details. When we switch to a spare layout (by the shortcuts or via applet's menu), rearrangement of layouts happen - the spare one becomes the last in the main loop, preempting the previous one on it's place. Layouts-specific shortcut actions activate the layout by index which is hold in the action's data. Thus, the indexes should be adjusted accordingly. (cherry picked from commit 7525b4a692ac4a13a29771568d3153b7505d75da) M +25 -2 kcms/keyboard/keyboard_daemon.cpp https://invent.kde.org/plasma/plasma-desktop/commit/2cb9201be1e3a3f3d8f8a040de19b6a5a7827538
*** Bug 466053 has been marked as a duplicate of this bug. ***
Git commit acd4fa1f74d752eba8c23ff5b325a9da6b3daf9c by Andrey Butirsky. Committed on 19/02/2023 at 22:22. Pushed by butirsky into branch 'Plasma/5.24'. fix: Keyboard layout shortcuts activate wrong language Fixes spare layout's shortcuts activating wrong layout after the first use, see the bug for the details. When we switch to a spare layout (by the shortcuts or via applet's menu), rearrangement of layouts happen - the spare one becomes the last in the main loop, preempting the previous one on it's place. Layouts-specific shortcut actions activate the layout by index which is hold in the action's data. Thus, the indexes should be adjusted accordingly. (cherry picked from commit 7525b4a692ac4a13a29771568d3153b7505d75da) M +25 -2 kcms/keyboard/keyboard_daemon.cpp https://invent.kde.org/plasma/plasma-desktop/commit/acd4fa1f74d752eba8c23ff5b325a9da6b3daf9c
It turned out that to get rid of crashes it is sufficient to delete the file ~/.config/kaccountsrc