Bug 467992 - Wrong keyboard layout switch hotkey behavior for more than two layouts and per window layout policy
Summary: Wrong keyboard layout switch hotkey behavior for more than two layouts and pe...
Status: ASSIGNED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Keyboard Layout (show other bugs)
Version: 5.27.3
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Mihail Milev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-31 09:57 UTC by Michael Lashkevich
Modified: 2024-04-17 12:04 UTC (History)
3 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 Michael Lashkevich 2023-03-31 09:57:48 UTC
I set four layouts (English(default), Russian, Hebrew, Yiddish), and set two `often used' layouts (Engish, Russian), so that my default layout switch key switches between two layouts. Besides, I set separate hotkeys for all four layouts (English: Meta+1, Russia: Meta+2, Hebrew: Meta+3, Yiddish: Meta+4). My layouts are set on the per window basis. When I change the focus of the windows, the order of the hotkeys switch.

For example. Let I have two windows: Window1 and Window2 and first switch to Russian in Window1 and then to Hebrew in Window2. Then I change the focus from Window2 to Window1. Then in Window1 the hotkey Meta+3 sets Russian and Meta+2 sets Hebrew. This continues till I change focus back to Window2 and set Russian there.

STEPS TO REPRODUCE
1. Set several languages >=3: L1, L2, L3,...
2. Set layout cycle (`often used layouts') say to 2.
3. Set per window layout policy.
4. Set hotkey K1 to L1, K2 to L2,...
4. Open two windows of any applications: W1 and W2.
5. Set L2 in W1 with K2 or default layout switch key.
6. Change focus to W2 and set L3 in W2 with K3.
7. Change focus to W1 and try to switch layouts.
OBSERVED RESULT
The key K2 switches to L3 and K3 to L2 in W1.

EXPECTED RESULT
The key K2 switches to L2 and K3 to L3 in W1.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE 15.4
KDE Plasma Version: 5.27.3 from http://download.opensuse.org/repositories/KDE:/Frameworks5/openSUSE_Leap_15.4/
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8 from http://download.opensuse.org/repositories/KDE:/Qt5/openSUSE_Leap_15.4/

ADDITIONAL INFORMATION

My ~/.config/kxkbrc looks like:

[$Version]
update_info=kxkb.upd:remove-empty-lists,kxkb.upd:add-back-resetoptions,kxkb_variants.upd:split-variants

[Layout]
DisplayNames=,,,
LayoutList=us,ru,il,yi
LayoutLoopCount=2
Model=asus_laptop
Options=grp:rctrl_toggle,lv3:ralt_switch_multikey
ResetOldOptions=true
ShowFlag=true
ShowLabel=false
ShowLayoutIndicator=true
ShowSingle=false
Use=true
VariantList=intl-unicode,ru_local,lyx,israeli
Comment 1 Andrey 2023-03-31 12:24:06 UTC
Thanks. I found the problem and have a fix in mind.
Note sure when I could implement it.

Please remind me if it takes too long..
Comment 2 Michael Lashkevich 2023-04-15 19:16:15 UTC
(In reply to Andrey from comment #1)
> Thanks. I found the problem and have a fix in mind.
> Note sure when I could implement it.
> 
> Please remind me if it takes too long..

You asked me to remind.
Comment 3 Andrey 2023-04-15 19:18:12 UTC
Thanks, haven't had a chance to progress further yet, sorry.
Comment 4 Michael Lashkevich 2023-04-30 09:03:08 UTC
(In reply to Andrey from comment #3)
> Thanks, haven't had a chance to progress further yet, sorry.
I remind once more.
Comment 5 Michael Lashkevich 2023-05-26 14:13:41 UTC
(In reply to Andrey from comment #3)
> Thanks, haven't had a chance to progress further yet, sorry.
I remind you.
Comment 6 Michael Lashkevich 2023-06-26 13:15:27 UTC
(In reply to Andrey from comment #3)
> Thanks, haven't had a chance to progress further yet, sorry.

I remind you again. For me it is very inconvenient to track every time, in which layout state I leave each window.
Comment 7 Andrey 2023-06-26 13:55:27 UTC
I do not have capacity for this recently, sorry.
Comment 8 Michael Lashkevich 2023-06-26 14:06:14 UTC
(In reply to Andrey from comment #7)
> I do not have capacity for this recently, sorry.

That's sad. But in plasma <=5.18? it worked perfectly. Is it possible to return the code to the initial state?
Comment 9 Andrey 2023-06-26 14:11:46 UTC
No, because we incorporated new platform-agnostic Wayland-capable applet to replace the old one since then. There is no way to return back.
The only way is a proper fix.
Comment 10 Michael Lashkevich 2023-07-27 16:46:32 UTC
(In reply to Andrey from comment #9)
> No, because we incorporated new platform-agnostic Wayland-capable applet to
> replace the old one since then. There is no way to return back.
> The only way is a proper fix.

I remind again. Maybe somebody else can do it, except you?
Comment 11 Michael Lashkevich 2023-09-10 18:16:12 UTC
Nearly half a year.
Comment 12 Michael Lashkevich 2023-10-16 10:10:12 UTC
(In reply to Andrey from comment #9)
> No, because we incorporated new platform-agnostic Wayland-capable applet to
> replace the old one since then. There is no way to return back.
> The only way is a proper fix.

It there any chance that the bug will be ever fixed?
Comment 13 Andrey 2023-10-18 15:27:37 UTC
(In reply to Michael Lashkevich from comment #10)
> (In reply to Andrey from comment #9)
> > No, because we incorporated new platform-agnostic Wayland-capable applet to
> > replace the old one since then. There is no way to return back.
> > The only way is a proper fix.
> 
> I remind again. Maybe somebody else can do it, except you?

Mihail Milev recently contributed layouts-related code.
Maybe he would be interested to fix this.
I don't know his email to CC here, though:
https://invent.kde.org/plasma/kwin/-/merge_requests/4433
Comment 14 Michael Lashkevich 2023-12-03 12:51:13 UTC
(In reply to Andrey from comment #13)
> (In reply to Michael Lashkevich from comment #10)
> > (In reply to Andrey from comment #9)
> > > No, because we incorporated new platform-agnostic Wayland-capable applet to
> > > replace the old one since then. There is no way to return back.
> > > The only way is a proper fix.
> > 
> > I remind again. Maybe somebody else can do it, except you?
> 
> Mihail Milev recently contributed layouts-related code.
> Maybe he would be interested to fix this.
> I don't know his email to CC here, though:
> https://invent.kde.org/plasma/kwin/-/merge_requests/4433
Eight months. Is there a method to attract somebody's attention to the bug?
Comment 16 Andrey 2023-12-07 18:21:39 UTC
(In reply to Andrey from comment #13)
> Mihail Milev recently contributed layouts-related code.
> Maybe he would be interested to fix this.
> I don't know his email to CC here, though:
> https://invent.kde.org/plasma/kwin/-/merge_requests/4433
Mihail is aware of the problem and willing to work on this, he just having difficulties with registering here:
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1722#note_826683
Comment 17 Mihail Milev 2023-12-07 18:44:33 UTC
Hi all,

I'll pick up this one. I hope I'll find the time till 6, but at least I'll be working on it.

BR
Mihail
Comment 18 Andrey 2023-12-07 19:00:51 UTC
Welcome Mihail!
Let's assign this issue to you then, you can also edit the https://bugs.kde.org/page.cgi?id=fields.html#assigned_to field yourself.
Comment 19 Mihail Milev 2023-12-11 20:03:42 UTC
Hi @Michael Lashkevich,

are we talking about Wayland or Xorg here? Out from the comments I assume Wayland, but just want to be sure.

BR
Mihail
Comment 20 Michael Lashkevich 2023-12-12 11:50:52 UTC
(In reply to Mihail Milev from comment #19)
> Hi @Michael Lashkevich,
> 
> are we talking about Wayland or Xorg here? Out from the comments I assume
> Wayland, but just want to be sure.
> 
> BR
> Mihail

It's Xorg. (Wayland version does not have the feature of limiting layout cycling to a smaller number of layouts.)
Comment 21 Bug Janitor Service 2023-12-13 09:45:51 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1923
Comment 22 Bug Janitor Service 2023-12-14 15:53:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1926
Comment 23 Michael Lashkevich 2024-04-17 12:04:48 UTC
More than a year. Is there any fix?