X86 platform drivers
 help / color / mirror / Atom feed
* [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops
@ 2025-09-11 14:13 Tomáš Hnyk
  2025-09-11 14:18 ` Hans de Goede
  2025-09-15 10:11 ` Ilpo Järvinen
  0 siblings, 2 replies; 5+ messages in thread
From: Tomáš Hnyk @ 2025-09-11 14:13 UTC (permalink / raw)
  To: platform-driver-x86

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.

Signed-off-by: Tomáš Hnyk <tomashnyk@gmail.com>
---
 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(-)

diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
index fcebfbaf0460..556d50fb7996 100644
--- a/drivers/platform/x86/lenovo/ideapad-laptop.c
+++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
@@ -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.51.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops
  2025-09-11 14:13 [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops Tomáš Hnyk
@ 2025-09-11 14:18 ` Hans de Goede
  2025-12-23 18:36   ` Tomáš Hnyk
  2025-09-15 10:11 ` Ilpo Järvinen
  1 sibling, 1 reply; 5+ messages in thread
From: Hans de Goede @ 2025-09-11 14:18 UTC (permalink / raw)
  To: Tomáš Hnyk, platform-driver-x86

Hi,

On 11-Sep-25 4:13 PM, Tomáš Hnyk wrote:
> 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.
> 
> Signed-off-by: Tomáš Hnyk <tomashnyk@gmail.com>
> ---
>  Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hansg@kernel.org>

Regards,

Hans





>  drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
> index fcebfbaf0460..556d50fb7996 100644
> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> @@ -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 } },
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/x86: lenovo: Reassign KEY_CUT to  KEY_SELECTIVE_SCREENSHOT for Ideapad laptops
  2025-09-11 14:13 [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops Tomáš Hnyk
  2025-09-11 14:18 ` Hans de Goede
@ 2025-09-15 10:11 ` Ilpo Järvinen
  2025-12-26 20:37   ` Tomáš Hnyk
  1 sibling, 1 reply; 5+ messages in thread
From: Ilpo Järvinen @ 2025-09-15 10:11 UTC (permalink / raw)
  To: Tomáš Hnyk; +Cc: platform-driver-x86

[-- Attachment #1: Type: text/plain, Size: 2818 bytes --]

On Thu, 11 Sep 2025, Tomáš Hnyk wrote:

> 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.

> Signed-off-by: Tomáš Hnyk <tomashnyk@gmail.com>
> ---
>  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.
 
>  drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
> index fcebfbaf0460..556d50fb7996 100644
> --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> @@ -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.

-- 
 i.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops
  2025-09-11 14:18 ` Hans de Goede
@ 2025-12-23 18:36   ` Tomáš Hnyk
  0 siblings, 0 replies; 5+ messages in thread
From: Tomáš Hnyk @ 2025-12-23 18:36 UTC (permalink / raw)
  To: platform-driver-x86


Hello,

On Thursday 11. September 2025, 16:18:11 (+02:00), Hans de Goede wrote:

> Hi,
> 
> On 11-Sep-25 4:13 PM, Tomáš Hnyk wrote:
> > 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.
> > 
> > Signed-off-by: Tomáš Hnyk <tomashnyk@gmail.com>
> > ---
> >  Fixes https://bugzilla.kernel.org/show_bug.cgi?id=220566
> 
> Thanks, patch looks good to me:
> 
> Reviewed-by: Hans de Goede <hansg@kernel.org>
> 
> 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


> 
> 
> 
> 
> >  drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
> > index fcebfbaf0460..556d50fb7996 100644
> > --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> > +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> > @@ -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 } },
> > 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops
  2025-09-15 10:11 ` Ilpo Järvinen
@ 2025-12-26 20:37   ` Tomáš Hnyk
  0 siblings, 0 replies; 5+ messages in thread
From: Tomáš Hnyk @ 2025-12-26 20:37 UTC (permalink / raw)
  To: platform-driver-x86


Hello,

On Monday 15. September 2025, 12:11:48 (+02:00), Ilpo Järvinen wrote:

> On Thu, 11 Sep 2025, Tomáš Hnyk wrote:
> 
> > 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.
> 
> > Signed-off-by: Tomáš Hnyk <tomashnyk@gmail.com>
> > ---
> >  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.
>  
> >  drivers/platform/x86/lenovo/ideapad-laptop.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/platform/x86/lenovo/ideapad-laptop.c b/drivers/platform/x86/lenovo/ideapad-laptop.c
> > index fcebfbaf0460..556d50fb7996 100644
> > --- a/drivers/platform/x86/lenovo/ideapad-laptop.c
> > +++ b/drivers/platform/x86/lenovo/ideapad-laptop.c
> > @@ -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.
> 
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-12-26 20:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 14:13 [PATCH] platform/x86: lenovo: Reassign KEY_CUT to KEY_SELECTIVE_SCREENSHOT for Ideapad laptops Tomáš Hnyk
2025-09-11 14:18 ` Hans de Goede
2025-12-23 18:36   ` Tomáš Hnyk
2025-09-15 10:11 ` Ilpo Järvinen
2025-12-26 20:37   ` Tomáš Hnyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox