Bug 451966 - Current application switching doesn't work properly in Wayland with US + deadkeys layout
Summary: Current application switching doesn't work properly in Wayland with US + dead...
Status: RESOLVED DUPLICATE of bug 405404
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 5.27.4
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-27 18:16 UTC by Guido Sanchez
Modified: 2023-05-04 08:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:
butirsky: Wayland+


Attachments
Current keyboard settings (854.86 KB, image/png)
2022-03-29 13:38 UTC, Guido Sanchez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guido Sanchez 2022-03-27 18:16:36 UTC
If you use Wayland, set the keyboard layout to "English, US, intl. with dead keys" and then try to switch between windows of the same application using "Alt+`" and "Alt+~", you have to press twice the "`" key in order to be able to change between windows.

On X11 this also didn't work as expected, but a workaround I found to make it work to use two layouts, first "English (intl., with AltGr dead keys)" and second "English (US, intl., with dead keys)", as suggested in #405404

STEPS TO REPRODUCE
1.  Create a new user on your system
2.  Login to that new user using Wayland
3.  Add the "English, US, intl. with dead keys" keyboard layout
4. Open two or more windows of the same application
5. Try to switch between them using "Alt+`" and "Alt+~"

OBSERVED RESULT
You have to press the "`" key twice (while holding Alt) in order to change between windows

EXPECTED RESULT
You can change between windows by pressing "Alt+`" or "Alt+~" only once.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.24
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Patrick Silva 2022-03-27 21:16:34 UTC
Same problem with brazilian portuguese (abnt2) keyboard layout.
I need to press "`" key twice while holding shift key.

Operating System: Arch Linux
KDE Plasma Version: 5.24.3
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Graphics Platform: Wayland
Comment 2 Andrey 2022-03-29 13:23:06 UTC
Could you try if adding extra "English" layout without dead keys as first one helps?
(Switching should happen with "dead keys" layout active, of course)
Comment 3 Guido Sanchez 2022-03-29 13:38:49 UTC
Created attachment 147821 [details]
Current keyboard settings

These are the current keyboard settings under a newly created user using all default desktop configurations.
Comment 4 Andrey 2022-03-29 13:48:55 UTC
Thanks.
I suspect it might be rather Qt problem because it's Qt who traverses among configured layouts to find Latin keysym for a key.
Needs further investigation.
Comment 5 Guido Sanchez 2022-03-29 13:50:33 UTC
I tried doing that (attached a screenshot), but the behavior of "Alt+`" and "Alt+~" didn't change using Wayland.

That workaround is also suggested in Bug #405404 and is needed in order for the switching between windows of the same application to work under X11.
Comment 6 Andrey 2022-03-31 10:59:41 UTC
If adding extra US layout worked, do you think it would be acceptable solution?
If so we could try to improve things on Qt side:
https://github.com/xkbcommon/libxkbcommon/issues/287
Comment 7 Guido Sanchez 2022-03-31 12:01:22 UTC
Andrey,

Adding the extra layout doesn't work when using Wayland. The suggestion on the Github issue you mention seems logical, but I don't know how to help there.

I will be glad to provide any additional info you need.
Comment 8 Andrey 2022-03-31 12:10:05 UTC
I mean - with the Qt change suggested, adding the layout would help.
Not sure how appropriate this solution would be from a user perspective.
Comment 9 Guido Sanchez 2022-03-31 12:15:13 UTC
I think that fix would be OK, at least for me.
Comment 10 kwizzz 2023-05-02 20:33:00 UTC
Came across this one via https://bugs.kde.org/show_bug.cgi?id=405404.
Is there any successful workaround on this?

I started with the default US layout,
then checked the option "Configure layouts" under Keyboard > Layouts.
First I added US intl with dead keys, because I thought that English US will stay, which it didn't.
So I added English US to the Layouts.
Then changed the order to have English US listed first.

No issues on X when using dead keys, but Wayland doesn't behave.
Comment 11 David Edmundson 2023-05-04 08:24:34 UTC
*** This bug has been marked as a duplicate of bug 405404 ***