linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Vinícius Reis" <itsme.vreis@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	angiolucci@gmail.com
Subject: Re: [PATCH] HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK
Date: Fri, 5 Nov 2021 14:55:17 -0700	[thread overview]
Message-ID: <YYWoRW9NRC58zQ9w@google.com> (raw)
In-Reply-To: <CALawNGC3HTV86+LAkMNf_nApqnUoAQ7UPEXOj9WXake5DhHkpQ@mail.gmail.com>

On Fri, Nov 05, 2021 at 12:16:45PM -0300, Vinícius Reis wrote:
> Em qui., 28 de out. de 2021 às 13:07, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> escreveu:
> >
> > Hi Vinícius,
> >
> > On Fri, Oct 8, 2021 at 3:24 PM Vinícius Angiolucci Reis
> > <itsme.vreis@gmail.com> 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
> 
> (Sorry, I'm sending this response again because it seems the first
> attempt didn't make it to the mailing lists for some reason.)
> 
> Hi Dmitry,
> 
> I've picked up this particular key event because it would trigger a close
> behavior to the one seen on Windows. It is far from being my preference,
> which would be an exact mimic of the Windows behavior (and can be
> achieved by xset dpms force on/off from user space).
> 
> The idea of this patch is to improve the user experience, by giving that key a
> behavior as close as possible to what users might experience on Windows.
> Because most Linux desktop environments also turn the display off after
> locking the screen, this would be a good approximation to what happens on
> Windows. I think it is more about giving (consistent) behavior to it
> than changing it.
> 
> I agree it is possible to control that via udev or something else. But
> most regular
> users won't be able to do that, ending up with an unused key, though.
> The hardcore user that would prefer a very different key behavior
> could keep using
> udev to do that.
> 
> So IMHO I think that setting this up on the kernel would be a good
> approach in this case.

I am sorry, I disagree. I understand that patching the kernel might be
easier than implementing new shortcut/behavior in various desktop
environments, but that does not make it the right approach.

Thanks.

-- 
Dmitry

  reply	other threads:[~2021-11-05 21:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 22:23 [PATCH] HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK Vinícius Angiolucci Reis
2021-10-19  9:17 ` Jiri Kosina
2021-10-28 16:07 ` Dmitry Torokhov
2021-11-05 15:16   ` Vinícius Reis
2021-11-05 21:55     ` Dmitry Torokhov [this message]
2021-11-06 23:48       ` Vinícius Reis
2021-11-07  2:08         ` Dmitry Torokhov
2021-11-07  2:35           ` Vinícius Reis
2021-11-09 10:21             ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YYWoRW9NRC58zQ9w@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=angiolucci@gmail.com \
    --cc=itsme.vreis@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).