Summary: | Selective_screenshot key on some Thinkpads is not recognized | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | tomashnyk |
Component: | input | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | bugseforuns, duha.bugs, fanzhuyifan, kde, nate |
Priority: | NOR | ||
Version First Reported In: | 6.4.4 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://bugs.kde.org/show_bug.cgi?id=475574 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
the key in question
screenshot picture |
Description
tomashnyk
2025-08-19 10:52:45 UTC
I use a different Lenovo laptop with a key used to the same purpose, The key does not activate the region screenshot mode by default, but I can set it manually in Shortcuts KCM, How does that key identify itself with libinput debug-events? And in the KDE dialog that assigns the shortcuts? Are you by any chance using X11? Created attachment 184255 [details]
screenshot
As we can see in the attached screenshot, the key identifies itself as "Cut" in Shortcuts KCM, I use Wayland.
libinput-debug-events output:
-event5 KEYBOARD_KEY +0.000s KEY_CUT (137) pressed
event5 KEYBOARD_KEY +0.000s KEY_CUT (137) released
Aha, interesting, that is a different keycode (137 against 634). Where and how does it appear on the keyboard, or what si your Laptop model? Created attachment 184259 [details]
picture
laptop model is "system version" seen in the attached screenshot. I'm attaching a picture showing my key.
I think your key is actually supposed to be selective_screenshot and is mislabeled. See https://support.lenovo.com/au/en/documentation/SG10220/ref_hotkey_icons?language=en For the icon that is on your keyboard, it says: "Opens the Snipping tool. (Windows operating systems)" Cut is supposed to be equivalent to CTRL+X. Now I dug into this for my laptop when I thought the problem was deeper down so I think the culprit is line 1331: https://github.com/torvalds/linux/blob/master/drivers/platform/x86/lenovo/ideapad-laptop.c If you change "KEY_CUT" to "KEY_SELECTIVE_SCREENSHOT" and compile your own kernel, hopefully you would see selective screenshot. That would make the key unusable out of the box but would be actually correct. If so, you can submit a patch to kernel and be a kernel developer, I guess :-D (I have never done this and I am not 100 % sure this one liner is enough of a fix but I hope it is). BTW: the key can be made usable by using software like https://github.com/samvel1024/kbct or https://github.com/rvaiya/keyd where you assign "selective_screenshot" to something like "prog4" and then that shows up in Plasma, until this underlying bug is resolved. @Nate Graham: Should not this bug https://bugs.kde.org/show_bug.cgi?id=475574 be then filled against kwin too? I think my bug and that bug are analogous (maybe to the point of being duplicates, not sure). Yeah, I'll move that there too. (In reply to tomashnyk from comment #6) > If you change "KEY_CUT" to "KEY_SELECTIVE_SCREENSHOT" and compile your own > kernel, hopefully you would see selective screenshot. That would make the > key unusable out of the box but would be actually correct. If so, you can > submit a patch to kernel and be a kernel developer, I guess :-D (I have > never done this and I am not 100 % sure this one liner is enough of a fix > but I hope it is). I reported it to the kernel bugzilla, let's see what happens with that: https://bugzilla.kernel.org/show_bug.cgi?id=220566 |