[Bug Fix] :: Fix Spare layout feature on Wayland

I like the idea of sponsored bugfixes.
One of cool feature that I use is Spare layout.

For configurations with more than two keyboard layouts it allows switching between N latest using single keyboard shortcut.

When used together with per-layout shortcut it allows something like followed (assuming that Meta+3 is configured to trigger layout 3 and Caps-Lock is configured to cycle between layouts)

  • layout 1 is active
  • Caps Lock switches to layout 2
  • Caps Lock switches to layout 1
  • Caps Lock switches to layout 2
  • Meta+3 switches to layout 3
  • Caps Lock switches to layout 2 (latest used)
  • Caps Lock switches to layout 3
  • Caps Lock switches to layout 2

Unfortunately this doesn’t work with Wayland.

Bug: 455431 – Spare layout not working on Wayland

I’ll donate $50 USD once fix is merged.

2 Likes

This has basically just been implemented with Add toggle previous keyboard layout shortcut (!1722) · Merge requests · Plasma / Plasma Desktop · GitLab.

1 Like

Excellent!.

Author of pull requests don’t want to get that $50.

I think I’ll add my $50 to one of other bug reports

1 Like

Hey @dion ,

is it really working like this for you in X like you described it above? Because from what I understood (and what I am experiencing), after you press on Meta+3, it will not toggle between 2 and 3, but it will toggle between 1 and 3.

BR
Mihail