Bug 500651 - Unable to map keys with keycodes above 255
Summary: Unable to map keys with keycodes above 255
Status: RESOLVED DUPLICATE of bug 475574
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (other bugs)
Version First Reported In: 6.3.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-24 05:07 UTC by David Korth
Modified: 2025-02-24 23:19 UTC (History)
4 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 David Korth 2025-02-24 05:07:53 UTC
SUMMARY
On my ThinkPad T14 Gen 3 (AMD), Fn-F9, Fn-F10, and Fn-F11 are not detected by KDE at all, e.g. in Shortcuts configuration. `libinput debug-events` does show that the kernel is recognizing these keys:

 event7   KEYBOARD_KEY                +0.000s   KEY_NOTIFICATION_CENTER (444) pressed
 event7   KEYBOARD_KEY                +0.000s   KEY_NOTIFICATION_CENTER (444) released
 event7   KEYBOARD_KEY                +0.628s   KEY_PICKUP_PHONE (445) pressed
 event7   KEYBOARD_KEY                +0.628s   KEY_PICKUP_PHONE (445) released
 event7   KEYBOARD_KEY                +0.915s   KEY_HANGUP_PHONE (446) pressed
 event7   KEYBOARD_KEY                +0.915s   KEY_HANGUP_PHONE (446) released


STEPS TO REPRODUCE
1. Open the Shortcuts KCM.
2. Attempt to configure a shortcut key.
3. On a ThinkPad with these keys, press Fn-F9, Fn-F10, or Fn-F11.

OBSERVED RESULT
The key isn't recognized and it acts like no key was pressed.

EXPECTED RESULT
The key is recognized and is mapped as a valid shortcut.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kernel 6.13.4
KDE Plasma Version: 6.3.1
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2

ADDITIONAL INFORMATION
This may be a Qt bug; not entirely sure.
Comment 1 Bug Janitor Service 2025-02-24 05:33:36 UTC
Thank you for the bug report!

Please note that Plasma 6.2.91 will not be supported for much longer by KDE; supported versions are 5.27., and 6.3 or newer.

Please upgrade to the latest version as soon as your distribution makes it available to you. Plasma is a fast-moving project, and bugs in one version are often fixed in the next one.
Comment 2 David Korth 2025-02-24 05:34:46 UTC
Whoops, somehow the Plasma version field was left at 6.2.91. I'm actually using 6.3.1, as indicated in the first comment.

Updated the Plasma version field.
Comment 3 fanzhuyifan 2025-02-24 22:20:47 UTC

*** This bug has been marked as a duplicate of bug 422401 ***
Comment 4 fanzhuyifan 2025-02-24 22:22:32 UTC
If `xmodmap -pke` doesn't contain these keys, then this is a duplicate of 422401 (kde cannot handle unmapped keys). If the output of `xmodmap -pke` contains these keys, but you cannot assign them in kde, feel free to reopen this issue.
Comment 5 David Korth 2025-02-24 22:27:45 UTC
`xmodmap -pke` only shows up to keycode 255. These keys are 444, 445, and 446.

I'm using Wayland, so I'm not sure if the 8-bit keycode limit still applies.

xkeyboard-config's repo does have definitions for these keys in two files:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/keycodes/evdev#L416
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/master/symbols/inet#L263

Unsure if they're actually used, though.
Comment 6 fanzhuyifan 2025-02-24 22:39:16 UTC
(In reply to David Korth from comment #5)
> `xmodmap -pke` only shows up to keycode 255. These keys are 444, 445, and
> 446.
> 
> I'm using Wayland, so I'm not sure if the 8-bit keycode limit still applies.
> 
> xkeyboard-config's repo does have definitions for these keys in two files:
> https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/
> master/keycodes/evdev#L416
> https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/blob/
> master/symbols/inet#L263
> 
> Unsure if they're actually used, though.

I see. Since keycodes above 255 might be different, for now let's keep this open as a separate issue.

Maybe https://www.reddit.com/r/swaywm/comments/exlcof/xkb_mapping_for_keycodes_higher_than_255/ is helpful.
Comment 7 fanzhuyifan 2025-02-24 23:19:51 UTC

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