Bug 466017 - Tiling Shortcut (Shift) not working with Keyboard-Layout German (Neo, QWERTZ)
Summary: Tiling Shortcut (Shift) not working with Keyboard-Layout German (Neo, QWERTZ)
Status: RESOLVED DUPLICATE of bug 465858
Alias: None
Product: kwin
Classification: Plasma
Component: Custom Tiling (show other bugs)
Version: 5.27.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Zamundaaa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-18 17:54 UTC by Flo
Modified: 2024-02-13 20:27 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Setting Screen for Keyboard Shortcuts (252.82 KB, image/png)
2023-02-18 17:54 UTC, Flo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Flo 2023-02-18 17:54:57 UTC
Created attachment 156452 [details]
Setting Screen for Keyboard Shortcuts

SUMMARY

Hello, I am really excited about the new Tiling-Feature, great work! However, after Updating to Plasma 5.27 I wasn't able to tile my windows. After some tinkering I discovered that the culprit is the Neo-QWERTZ Keyboard Layout.

STEPS TO REPRODUCE (I'm not sure about the English descriptions of the menu entries, I'll attach an screenshot showing where the settings can be found)
1.  Go to Settings -> Input Devices -> Keyboard -> Layouts -> Check: Configure Layouts
2.  Add the Layout "de | Deutsch | Deutsch (Neo, QWERTZ) | 🇩🇪
3. Hit Apply
4. Try to tile a window in a zone by dragging and holding SHIFT

OBSERVED RESULT
The window isn't tiled into the zone, it seems like no button is pressed at all.

EXPECTED RESULT
The window should tile the same way it does when the Keyboard is set to a different layout.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.12-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT
Manufacturer: Micro-Star International Co., Ltd.
Product Name: MS-7C91
System Version: 2.0
Comment 1 Flo 2023-02-18 18:50:19 UTC
I've been looking through some files and might have a clue where the bug might originate. But since I'm quite inexperienced with Linux, Plasma and kwin i might be wrong.

The code that checks if a window should be tiled uses the condition: `(input()->modifiersRelevantForGlobalShortcuts() & Qt::ShiftModifier)` 
https://invent.kde.org/plasma/kwin/-/blob/master/src/window.cpp#L1686

Digging through the rabbit whole I ended up here https://invent.kde.org/plasma/kwin/-/blob/master/src/xkb.cpp#L289, which looks like the place where the "shift modifier" is "configured". 

Looking up `XKB_MOD_NAME_SHIFT` seems to yield a string match for `Shift`.

I think the Keymap is located here `/usr/share/kbd/keymaps/i386/neo/neoqwertz.map.gz`. Opening it looking through the included `neoqwertz.map` I encountered the following line (181):

```
keycode  42 = ShiftL
```

Could this be the cause of the Bug, that in the Neo-Qwertz keymap the Keys are "labled" Shift**L** and Shift**R**?

What do you think would be the best way to get this fixed? Is it something you guys are able to address or should I try and find out whoever maintains this keymap and ask them about this issue?
Comment 2 David Redondo 2023-02-21 09:37:59 UTC
Are you on wayland? I can reproduce it there but on X11 and neo qwertz shift drag works.
Comment 3 Flo 2023-02-21 12:12:22 UTC
Yes, this is on Wayland.
Comment 4 Alois Wohlschlager 2023-06-03 08:33:59 UTC
I think the /usr/share/kbd/keymaps/i386/neo/neoqwertz.map.gz difference is a red herring. This is the console keymap. `xkbcli` tells me about `Shift_L` and `Shift_R` with both standard QWERTZ layout (which works) and Neo (which doesn't work).

My guess would be that the Neo caps-lock implementation (pressing both shift keys at the same time) somehow leads to a difference in the state machine.
Comment 5 Nate Graham 2023-06-20 19:29:05 UTC
Can confirm. Xaver, can you take look? Thanks!

Might also have the same or a similar root cause as Bug 465858.
Comment 6 manuel 2024-01-23 11:17:03 UTC
Was surprised that tiling stopped working when changing from X11 to Wayland session.
Also using Neo2 Layout.
At first, thought it might be due to manual fiddling with virtual desktop config. But reverting my changes did not do anything.
Then tried having Neo2 and German standard layout both available, but switching between them did not fix the issue neither.
Moreover, back in X11, tiling also did not work anymore (!) until I removed layout selection and changed back to Neo2 only.
Comment 7 Zamundaaa 2024-02-13 20:27:16 UTC

*** This bug has been marked as a duplicate of bug 465858 ***