public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Vinícius Angiolucci Reis" <angiolucci@gmail.com>
To: jikos@kernel.org
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	dmitry.torokhov@gmail.com,
	"Vinícius Angiolucci Reis" <angiolucci@gmail.com>
Subject: [PATCH] Revert "HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK"
Date: Thu, 11 Nov 2021 19:47:35 -0300	[thread overview]
Message-ID: <20211111224735.29665-1-angiolucci@gmail.com> (raw)

This reverts commit 2ea5999d07d2a0ab6ad92ccf65524707f2c5e456.

As Dmitry Torokhov pointed out, the previous code (KEY_DISPLAY_OFF) is
actually correct. The real issue is that current desktop environments
don't deal it properly. Mapping it to another event does not solve the
issue.

So I'm reverting that change, keeping key 0x35 mapped to KEY_DISPLAY_OFF

Signed-off-by: Vinícius Angiolucci Reis <angiolucci@gmail.com>
---
 drivers/hid/hid-asus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 5d57214d8dee..f3ecddc519ee 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -854,7 +854,7 @@ static int asus_input_mapping(struct hid_device *hdev,
 		switch (usage->hid & HID_USAGE) {
 		case 0x10: asus_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
 		case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP);		break;
-		case 0x35: asus_map_key_clear(KEY_SCREENLOCK);		break;
+		case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF);		break;
 		case 0x6c: asus_map_key_clear(KEY_SLEEP);		break;
 		case 0x7c: asus_map_key_clear(KEY_MICMUTE);		break;
 		case 0x82: asus_map_key_clear(KEY_CAMERA);		break;
-- 
2.33.1


             reply	other threads:[~2021-11-11 22:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11 22:47 Vinícius Angiolucci Reis [this message]
2021-11-12 10:28 ` [PATCH] Revert "HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK" 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=20211111224735.29665-1-angiolucci@gmail.com \
    --to=angiolucci@gmail.com \
    --cc=dmitry.torokhov@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