Bug 482959 - On Wayland, Shortcuts do not work if a Numpad key is assigned to it
Summary: On Wayland, Shortcuts do not work if a Numpad key is assigned to it
Status: RESOLVED DUPLICATE of bug 481164
Alias: None
Product: frameworks-kglobalaccel
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 6.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-09 09:23 UTC by VesperLlama
Modified: 2024-03-09 16:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Shortcut assigned on X11 and on Wayland (19.20 KB, image/png)
2024-03-09 09:23 UTC, VesperLlama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description VesperLlama 2024-03-09 09:23:23 UTC
Created attachment 166783 [details]
Shortcut assigned on X11 and on Wayland

SUMMARY
I am on a laptop which has arrow, PageUp, PageDown, Home, End keys in the Numpad. If I assign any shorcut to a combination which include these keys or other numpad keys then the shortcuts do not work.

If I set the shortcut on X11 then the shortcut shows up as "Ctrl+Num+PageUp" but on Wayland it shows as "Ctrl+PageUp". If the shortcut is assigned in X11 then it works on both X11 and Wayland. 


STEPS TO REPRODUCE
1. Assign any shortcut to a combination which includes the Numpad key. Example - Ctrl+Alt+PageUp.
2. Try to use the shortcut

OBSERVED RESULT
Nothing happens.

EXPECTED RESULT
The assigned shortcut should be triggered.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This used to work fine on Plasma 5.
Comment 1 fanzhuyifan 2024-03-09 16:23:44 UTC
Here is what I can reproduce on my end (wayland, git build, arch linux) using PgDn on the numpad:

1. assigning Ctrl+PgDn shows as  Ctrl+Num+PgDn, works as assigned
2. same with Alt+PgDn, Meta+PgDn, Ctrl+Alt+PgDn.
3. Same with PgUp instead of PgDn


If you open krunner and search for kwin debug, and open the kwin debug console, what events do you see when you press ctrl+alt+pgdn? What do you see if you run `sudo libinput debug-events --show-keycodes `?
Comment 2 VesperLlama 2024-03-09 16:41:30 UTC
Input Events in Kwin Debug Console give this
> Scan code 29
> Qt::Key code Key_Control
> Scan code 56
> Qt::Key code Key_Alt
> Scan code 81
> Qt::Key code Key_PageDown


> sudo libinput debug-events --show-keycodes

Gives the following output 
> event4   KEYBOARD_KEY            +0.000s       KEY_LEFTCTRL (29) pressed
> event4   KEYBOARD_KEY            +0.234s       KEY_LEFTALT (56) pressed
> event4   KEYBOARD_KEY            +0.589s       KEY_KP3 (81) pressed
> ^[[6;7~ event4   KEYBOARD_KEY            +0.655s        KEY_KP3 (81) released
> event4   KEYBOARD_KEY            +1.236s       KEY_LEFTALT (56) released
> event4   KEYBOARD_KEY            +1.403s       KEY_LEFTCTRL (29) released
Comment 3 VesperLlama 2024-03-09 16:44:17 UTC
> sudo libinput debug-events --show-keycodes

Gives the same output in X11 too.
Comment 4 fanzhuyifan 2024-03-09 16:46:25 UTC
(In reply to VesperLlama from comment #2)
> Input Events in Kwin Debug Console give this

What do you see for the modifiers? Is it Ctrl, Alt, Num, or just Ctrl and Alt?

> event4   KEYBOARD_KEY            +0.655s        KEY_KP3 (81) released

So at least libinput is correctly reporting a numpad press.
Comment 5 fanzhuyifan 2024-03-09 16:47:53 UTC
(In reply to fanzhuyifan from comment #4)
> What do you see for the modifiers? Is it Ctrl, Alt, Num, or just Ctrl and
> Alt?

Sorry I meant keypad instead of num.
Comment 6 VesperLlama 2024-03-09 16:50:14 UTC
It says "Control Alt Keypad" in the modifiers for Page Down.
Comment 7 fanzhuyifan 2024-03-09 16:58:01 UTC
(In reply to VesperLlama from comment #6)
> It says "Control Alt Keypad" in the modifiers for Page Down.

Can reproduce on neon unstable, can't reproduce on arch with plasma 6.0.1 running Qt 6.7. So I think this is a duplicate of 481164 and will be fixed by upcoming Qt releases.

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