Re: [PATCH] HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK

From: Dmitry Torokhov
Date: Thu Oct 28 2021 - 12:07:41 EST


Hi Vinícius,

On Fri, Oct 8, 2021 at 3:24 PM Vinícius Angiolucci Reis
<itsme.vreis@xxxxxxxxx> wrote:
>
> On Windows systems, ASUS laptops uses the "turn display off" key
> (usually fn+f6) to turn both display and keyboard backlit off. On Linux
> systems, this key has no effect at all since most desktop enviroments
> don't deal with KEY_DISPLAY_OFF. By mapping it to KEY_SCREENLOCK
> instead, would enable desktop environments to handle this key as a
> screen lock intent from the user, out of the box.

But is it the intent of the user? The fact that current desktop
environments do not handle this key is not a reason to change kernel
behavior.

If screen lock is simply your preference then you can change the
mapping via udev on your system without the need to patch the kernel.

Thanks.

--
Dmitry