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.0.4
Platform: Arch Linux Linux
: HI wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: wayland
: 446898 460788 464049 475470 483607 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-16 18:29 UTC by Indicozy
Modified: 2024-05-12 17:52 UTC (History)
24 users (show)

See Also:
Latest Commit:
Version Fixed In:


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
"Spare Layouts" not working on Wayland (Plasma 6)