Bug 503230 - Can't bind KEY_PROG2 as shortcut
Summary: Can't bind KEY_PROG2 as shortcut
Status: RESOLVED NOT A BUG
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (other bugs)
Version First Reported In: 6.3.4
Platform: Fedora RPMs Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-23 13:19 UTC by Luca Stefani
Modified: 2025-04-24 09:07 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Stefani 2025-04-23 13:19:55 UTC
SUMMARY
Binding/adding a new shortcut combo that uses the KEY_PROG2 event code isn't registered.
KEY_PROG{1,3,4} are working as expected and get mapped to Launch{1,3,4} respectively.

STEPS TO REPRODUCE
1. System Settings
2. Shortcuts
3. Add
4. Press key that send KEY_PROG2

OBSERVED RESULT
No change

EXPECTED RESULT
KEY_PROG2 is bound.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0

ADDITIONAL INFORMATION
I checked xkb and qt6base and they both have the definition mapped to Launch2, and that looks proper at first glance.
Mapping the same hw key to PROG4 works, so it's just PROG2.

evtest properly reports the key as follows:
Event: time 1745414363.951980, type 4 (EV_MSC), code 4 (MSC_SCAN), value 4c
Event: time 1745414363.951980, type 1 (EV_KEY), code 149 (KEY_PROG2), value 1
Event: time 1745414363.951980, -------------- SYN_REPORT ------------
Event: time 1745414363.952009, type 1 (EV_KEY), code 149 (KEY_PROG2), value 0
Event: time 1745414363.952009, -------------- SYN_REPORT ------------
Comment 1 Wismill 2025-04-24 08:54:18 UTC
Are you using a Wayland or a X11 session?
Could you try your shortcut in the corresponding `xkbcli interactive-wayland` or `xkbcli interactive-x11` (keep the blank window focus while typing, press ESC to quit) and post the result here? You may need to install the libxkbcommon-tools package (or other similar name). 
Please also report the version of the libxkbcommon package.
Comment 2 Luca Stefani 2025-04-24 09:07:27 UTC
Well right as I was testing this I tried again in settings and it now works?
I have tried to reboot before but it didn't change anything.
I'll keep in mind in case it happens again, anyways here's the output of the _working_ system

---

(In reply to Wismill from comment #1)
> Are you using a Wayland or a X11 session?
Wayland

> Could you try your shortcut in the corresponding `xkbcli
> interactive-wayland` or `xkbcli interactive-x11` (keep the blank window
> focus while typing, press ESC to quit) and post the result here? You may
> need to install the libxkbcommon-tools package (or other similar name). 
> Please also report the version of the libxkbcommon package.
$ xkbcli interactive-wayland
seat0: keycode [ I157 ] keysyms [ XF86Launch2                  ] unicode [   ] layout [ Italian (0) ] level [ 0 ] mods [ ] leds [ ]