Skip to contentSkip to conversation

platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops

PATCH Superseded Tomáš Hnyk 3 participants 5 messages Sep 11, 2025 – Dec 26, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops

This key is produced by FN+PRINT_SCREEN and as per Lenovo documentation, it should be "Open the Snipping tool". This corresponds to KEY_SELECTIVE_SCRENSHOT, whose keycode is 0x27a. Previously, keycodes under 248 were preferred due to X11 limitations, so KEY_CUT was used. This is now being corrected.

---
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lenovo/ideapad-laptop.c +1 -1
index fcebfbaf0460..556d50fb7996 100644
@@ -1328,7 +1328,7 @@ static const struct key_entry ideapad_keymap[] = {
    /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
    { KE_KEY,   0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
    /* shift + prtsc */
-   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
    { KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
    { KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
 
Signature · 1 line
2.51.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 9 lines · Tomáš Hnyk

This key is produced by FN+PRINT_SCREEN and as per Lenovo documentation, it should be "Open the Snipping tool". This corresponds to KEY_SELECTIVE_SCRENSHOT, whose keycode is 0x27a. Previously, keycodes under 248 were preferred due to X11 limitations, so KEY_CUT was used. This is now being corrected.

---
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

Thanks, patch looks good to me:

Regards,

Hans

Quoted 16 lines
 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lenovo/ideapad-laptop.c +1 -1
index fcebfbaf0460..556d50fb7996 100644
@@ -1328,7 +1328,7 @@ static const struct key_entry ideapad_keymap[] = {
    /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
    { KE_KEY,   0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
    /* shift + prtsc */
-   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
    { KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
    { KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
 
#2 lore raw

Hello,

Quoted 13 lines · Hans de Goede

Hi,

Quoted 9 lines · Tomáš Hnyk

This key is produced by FN+PRINT_SCREEN and as per Lenovo documentation, it should be "Open the Snipping tool". This corresponds to KEY_SELECTIVE_SCRENSHOT, whose keycode is 0x27a. Previously, keycodes under 248 were preferred due to X11 limitations, so KEY_CUT was used. This is now being corrected.

---
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

Quoted 8 lines

Thanks, patch looks good to me:

Regards,

Hans

This has been a couple of months but from what I can see, this patch has not been applied, has it been forgotten? Tomas

Quoted 22 lines
Quoted 20 lines



 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lenovo/ideapad-laptop.c +1 -1
index fcebfbaf0460..556d50fb7996 100644
@@ -1328,7 +1328,7 @@ static const struct key_entry ideapad_keymap[] = {
    /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
    { KE_KEY,   0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
    /* shift + prtsc */
-   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
    { KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
    { KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },
 
maintainer
#3 lore raw
In reply to Tomáš Hnyk
Quoted 5 lines · Tomáš Hnyk

This key is produced by FN+PRINT_SCREEN and as per Lenovo documentation, it should be "Open the Snipping tool". This corresponds to KEY_SELECTIVE_SCRENSHOT, whose keycode is 0x27a. Previously, keycodes under 248 were preferred due to X11 limitations, so KEY_CUT was used. This is now being corrected.

Hi Tomas,

Thanks for the patch.

Please use "platform/x86: ideapad-laptop:" as the prefix for shortlog and remove "for Ideapad laptops" as prefix already covers that information.

I'd rehrapse the commit message to something along the lines of:

As per Lenovo documentation, Fn+Print-Screen should "Open the Snipping tool" which corresponds to KEY_SELECTIVE_SCREENSHOT (keycode 0x27a). It is currently assigned to KEY_CUT because keycodes under 248 were preferred due to X11 limitations.

Reassign Fn+Print-Screen from KEY_CUT to KEY_SELECTIVE_SCREENSHOT.

Note also there should be double E in SCREENSHOT.

Quoted 3 lines

---
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

Fixes: (note the colon) tag should refer to a commit you're fixing with this patch (not really applicable here). It also has a certain formatting requirements which are explained in Documentation/process in case you need to use that tag one day.

Closes: is the correct tag to use for bug tickets so please change to that.

Also, please place all tags before your signed-off-by line as anything you put after --- line will be automatically cut by maintainer tools.

Quoted 8 lines
 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lenovo/ideapad-laptop.c +0 -0
index fcebfbaf0460..556d50fb7996 100644

drivers/platform/x86/lenovo/ideapad-laptop.c static const struct key_entry ideapad_keymap[] = { · line 1333

Quoted 7 lines
drivers/platform/x86/lenovo/ideapad-laptop.c +1 -1
@@ -1328,7 +1328,7 @@ static const struct key_entry ideapad_keymap[] = {
    /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
    { KE_KEY,   0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
    /* shift + prtsc */
-   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
    { KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
    { KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },

This patch is corrupted by spaces. (This is a quite common problem, no need to apologize).

After fixing the forementioned issues, please send v2. You may want to try first to send the patch only to yourself and try applying the patch you received from yourself to check that nothing corrupted the patch while sending it.

Signature · 1 line
 i.
#4 lore raw

Hello,

Quoted 61 lines · Ilpo Järvinen
Quoted 5 lines · Tomáš Hnyk

This key is produced by FN+PRINT_SCREEN and as per Lenovo documentation, it should be "Open the Snipping tool". This corresponds to KEY_SELECTIVE_SCRENSHOT, whose keycode is 0x27a. Previously, keycodes under 248 were preferred due to X11 limitations, so KEY_CUT was used. This is now being corrected.

Hi Tomas,

Thanks for the patch.

Please use "platform/x86: ideapad-laptop:" as the prefix for shortlog and remove "for Ideapad laptops" as prefix already covers that information.

I'd rehrapse the commit message to something along the lines of:

As per Lenovo documentation, Fn+Print-Screen should "Open the Snipping tool" which corresponds to KEY_SELECTIVE_SCREENSHOT (keycode 0x27a). It is currently assigned to KEY_CUT because keycodes under 248 were preferred due to X11 limitations.

Reassign Fn+Print-Screen from KEY_CUT to KEY_SELECTIVE_SCREENSHOT.

Note also there should be double E in SCREENSHOT.

Quoted 3 lines

---
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

Fixes: (note the colon) tag should refer to a commit you're fixing with this patch (not really applicable here). It also has a certain formatting requirements which are explained in Documentation/process in case you need to use that tag one day.

Closes: is the correct tag to use for bug tickets so please change to that.

Also, please place all tags before your signed-off-by line as anything you put after --- line will be automatically cut by maintainer tools.

Quoted 8 lines
 drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/lenovo/ideapad-laptop.c +0 -0
index fcebfbaf0460..556d50fb7996 100644

drivers/platform/x86/lenovo/ideapad-laptop.c static const struct key_entry ideapad_keymap[] = { · line 1333

Quoted 7 lines
drivers/platform/x86/lenovo/ideapad-laptop.c +1 -1
@@ -1328,7 +1328,7 @@ static const struct key_entry ideapad_keymap[] = {
    /* Performance toggle also Fn+Q, handled inside ideapad_wmi_notify() */
    { KE_KEY,   0x3d | IDEAPAD_WMI_KEY, { KEY_PROG4 } },
    /* shift + prtsc */
-   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_CUT } },
+   { KE_KEY,   0x2d | IDEAPAD_WMI_KEY, { KEY_SELECTIVE_SCREENSHOT } },
    { KE_KEY,   0x29 | IDEAPAD_WMI_KEY, { KEY_TOUCHPAD_TOGGLE } },
    { KE_KEY,   0x2a | IDEAPAD_WMI_KEY, { KEY_ROOT_MENU } },

This patch is corrupted by spaces. (This is a quite common problem, no need to apologize).

Quoted 5 lines

After fixing the forementioned issues, please send v2. You may want to try first to send the patch only to yourself and try applying the patch you received from yourself to check that nothing corrupted the patch while sending it.

Sorry, I completely missed this e-mail back in September. I have just sent version2. I first tried to send it to myself and it applied. I also fixed the commit message. I hope now everything is ok. Tomas