Bug 390109 - Meta+é etc. hotkeys not working on French AZERTY keyboards
Summary: Meta+é etc. hotkeys not working on French AZERTY keyboards
Status: CONFIRMED
Alias: None
Product: frameworks-kdeclarative
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.73.0
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-08 21:42 UTC by Mahendra Tallur
Modified: 2023-05-09 10:16 UTC (History)
9 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 Mahendra Tallur 2018-02-08 21:42:58 UTC
Hi ! 

A few releases back, hotkeys for switching windows directly were introduced (which is extremely handy). By default, META-1 switches to the first window in the task manager, META-2 to the second etc.

It raises 2 connected issues when used with French AZERTY Keyboards.

1- On an azerty keyboard, the top row used for digits is also used for common characters like &, é, ", ', (... So SHIFT has to be pressed to get the digits. Thus, Meta-1 doesn't work as it would have to be Meta-&, for instance

2- Of course, it can be redefined manually. But it doesn't work with the following keys : é, è, ç, à (respectively 2, 7, 9, 0). Indeed, in the system settings, when I remap an action and hit Meta-é, for some reason the uppercase version Meta-É is detected. 

Issue(s) occur(s) as of today in KDE Neon with Plasma 5.12.
Comment 1 Kai Uwe Broulik 2018-02-22 08:25:19 UTC
Interesting, thanks for the investigation. I'm not sure how to proceed here.
I wasn't very happy with assigning 10 custom shortcuts in the first place and apparently my feeling about that was right.
Comment 2 adrien.brunelat 2019-10-22 17:17:44 UTC
Hello,

Any news regarding this bug? It's also preventing Latte Dock shortcuts for launching apps quickly using the Meta key.
Comment 3 Nate Graham 2020-07-12 04:11:14 UTC
Seems related to Bug 423305.
Comment 4 Jan Paul Batrina 2020-08-30 09:26:33 UTC
It is indeed related related to Bug 423305. I also tried replicating the issue, and it persists even after the patch.

This all revolves around KKeyServer::isShiftAsModifierAllowed
https://invent.kde.org/frameworks/kwindowsystem/-/blob/master/src/kkeyserver.cpp#L96

It only "filters" for some hardcoded keys (including numbers), but I think only takes into account QWERTY/US layout(s). Fixing this through the same mechanism will require that number keys be added, but that might introduce bugs for other keyboard layouts.

The only solutions I can think of are:
    * removing the hardcoded keys and dynamically checking for Shift-able shortcut depending on the keyboard layout. This will might break if the user has many keyboard shortcuts
    * Making it so that Qt does not "translate" Shift-able keys (e.g. Shift+1 should be returned as "1" with Qt::ShiftModifier instead of "!" with Qt::ShiftModifier)

I am not familiar with Qt development, and I understand Qt is a hugely popular framework widely used outside of KDE, so the latter might be hard to do.

Other workarounds would be to check for scancodes (QKeyEvent::nativeScanCode), but it might be too messy (multiple keyboard layouts, it might return 0, it does not work on macOS).
Comment 5 Jan Paul Batrina 2020-08-30 09:38:18 UTC
I apologize, turns out I tested this case without the patch in Bug 423305, and turns out that patch also fixes this issue.

Still, there might be a (decently common) keyboard layout out there that is not covered, so it still might be worth fixing overall
Comment 6 Jan Paul Batrina 2020-08-30 10:00:50 UTC
To clarify, it fixes Meta+Shift+2 in AZERTY keyboards, but Meta+é etc. still does not work.
Comment 7 cedric.nanteau 2021-09-17 08:49:50 UTC
Hi !

I use Kubuntu and this issue is still not fixed.
Does anyone know if it will be fixed one day ? I know it's a minor bug but still annoying. 

Thanks
Comment 8 Thomas Cochat 2023-05-09 10:16:47 UTC
Hi.

I tried to change my keyboard layout with xmodmap to get some key to become É (notice the capital !) and the shortcut works. 

So this issue might be related to some upper case conversion issue for non ascii character. Most shortcuts will display the upper case letter ( Meta + a displayed as Meta + A). You can also see it in the  ".config/kglobalshortcutsrc" file.

I'm not sure why Meta + A works with its lower case equivalent but Meta + É doesn't.