Bug 455431 - "Spare Layouts" feature on Wayland
Summary: "Spare Layouts" feature on Wayland
Status: ASSIGNED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (show other bugs)
Version: 6.3.3
Platform: Arch Linux Linux
: HI wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland-only
: 446898 460788 464049 475470 483607 493704 498057 499527 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-16 18:29 UTC by Indicozy
Modified: 2025-03-17 16:06 UTC (History)
40 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Indicozy 2022-06-16 18:29:28 UTC
SUMMARY

When I change 1st level of layouts, the second level of layouts are also being changing. For instance, if English and Russian were the 1st level and Norwegian is the 2nd level, Norwegian is also seems when I press 'Main shortcuts' shortcut. 

STEPS TO REPRODUCE
1. Install latest version of KDE Plasma
2. Add layouts to keyboard at settings and add the third language as space layout
3. See the third level layout on main layouts list when you press 'Main shortcuts' shortcut

OBSERVED RESULT
The third level layout shows in the list of the main layout when I switch to another.

EXPECTED RESULT
Third level layout won't be seen in the main layout switch.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: OpenSUSE Tumbleweed v20220613
(available in About System)
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Andrey 2022-06-16 18:37:01 UTC
Please note spare layouts feature is not implemented for Wayland (yet).

As it becomes recurring, we should probably add the platform to SOFTWARE/OS VERSIONS generation.
Any ideas what's the best way to achieve that? (file an issue to some component etc.)
Comment 2 Indicozy 2022-06-16 18:39:20 UTC
(In reply to Andrey from comment #1)
> Please note spare layouts feature is not implemented for Wayland (yet).
> 
> As it becomes recurring, we should probably add the platform to SOFTWARE/OS
> VERSIONS generation.
> Any ideas what's the best way to achieve that? (file an issue to some
> component etc.)

Yep, I've used on Wayland and I think as I migrated to it lately I got this issue. I'll wait then when it will be fixed on wayland
Comment 3 Andrey 2022-06-16 18:49:08 UTC
Note it's not even planned though. Hope I'll have time some day to put my hands on it.

Probably was reported already but couldn't find it.
Comment 4 Indicozy 2022-06-16 18:50:50 UTC
(In reply to Andrey from comment #3)
> Note it's not even planned though. Hope I'll have time some day to put my
> hands on it.
> 
> Probably was reported already but couldn't find it.

No problem, there's no need to rush on it
Comment 5 Nate Graham 2022-10-21 22:31:11 UTC
*** Bug 460788 has been marked as a duplicate of this bug. ***
Comment 6 Nate Graham 2023-01-09 22:57:32 UTC
*** Bug 464049 has been marked as a duplicate of this bug. ***
Comment 7 zvova7890 2023-01-10 09:28:27 UTC
Guys, how about this:

>> I have suggestion about how it also can be done on wayland(and maybe x11) session. It is just like MacOS behavior. If you are press
>> Meta+Space(assuming this is us shortcut for layout switch), you switch 1st -> 2nd layout. Then if in second switch you release Meta key and
>> build combination again by pressing Meta+Space - you switch back 2nd -> 1st. If you are don't release Meta key and continue pressing
>> Space you going by simple circle switch as usually.

I have take a look into shortcut code processor in kwin, found src/keyboard_layout.cpp source, but this shortcut is rely to "Alternative shortcut". Advanced tab is in another place and works way difference. Mentioned source has dbus interface KeyboardLayoutDBusInterface, I think advanced tab shortcut must use this interface to centralize switch logic. keyboard_layout.cpp has switchToNextLayout and switchToPreviousLayout switching methods, how about to add some "switchToPreferLayout" and add KeyboardLayout::keyEvent(KeyEvent *event) override to track "Meta" key or any key that represents in shortcut as first key in sequence? But if sequence include just one key(caps for example) this won't work, and we are going to the simple circle switch.
Comment 8 Andrey 2023-01-14 22:12:12 UTC
It's all possible, but first we should replicate X11 behavior I think. For that we need to create the structures in KWin required.
Then we could imitate the MacOS behaviour or whatever.
I'm sorry but I still not on it yet.
Comment 9 Nate Graham 2023-06-20 19:36:07 UTC
*** Bug 446898 has been marked as a duplicate of this bug. ***
Comment 10 Nate Graham 2023-10-11 18:50:04 UTC
*** Bug 475470 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2023-12-20 23:24:38 UTC
In progress with https://invent.kde.org/plasma/kwin/-/merge_requests/4708!
Comment 12 Andrey 2024-03-14 22:16:47 UTC
*** Bug 483607 has been marked as a duplicate of this bug. ***
Comment 13 Mihael 2024-05-06 14:44:27 UTC Comment hidden (spam)
Comment 14 jonathanalanwalls 2024-05-22 09:40:16 UTC
The Spare Layouts functionality is not working for me either on Wayland Plasma 6.04. Is this still in progress? I am a linguist and it is fairly important to my work. Thank you!
Comment 15 zvova7890 2024-05-22 15:36:42 UTC Comment hidden (spam)
Comment 16 Nate Graham 2024-05-22 20:23:40 UTC Comment hidden (spam)
Comment 17 geisserml 2024-05-22 21:07:44 UTC
Also experiencing this issue.

It's quite useful to have a group of main layouts to switch through, and other layouts on demand with specific shortcuts.
e.g. native layout with and without dead keys as primary group (toggle shortcut for frequent switching), and a cyrillic layout with separate shortcut as it is needed only occasionally.
Comment 18 jonathanalanwalls 2024-05-23 09:16:49 UTC Comment hidden (spam)
Comment 19 Lena 2024-06-11 09:32:42 UTC Comment hidden (spam)
Comment 20 Andrew 2024-07-08 10:16:41 UTC Comment hidden (spam)
Comment 21 Nate Graham 2024-09-30 16:24:49 UTC
*** Bug 493704 has been marked as a duplicate of this bug. ***
Comment 22 Nik 2024-10-22 09:36:00 UTC Comment hidden (spam)
Comment 23 Nirva 2024-11-21 20:51:09 UTC Comment hidden (spam)
Comment 24 Oswald Buddenhagen 2025-01-03 01:02:32 UTC
*** Bug 498057 has been marked as a duplicate of this bug. ***
Comment 25 Wismill 2025-02-14 10:57:18 UTC
*** Bug 499527 has been marked as a duplicate of this bug. ***
Comment 26 Ryuji 2025-03-15 12:37:27 UTC Comment hidden (spam)
Comment 27 Nate Graham 2025-03-17 16:06:02 UTC
This is a bug tracker, not a forum. Please only comment if you have something technical to add that will help drive the discussion or the feature forward. Thanks all.