diff options
author | VinÃcius Angiolucci Reis <itsme.vreis@gmail.com> | 2021-10-08 19:23:27 -0300 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2021-10-19 11:17:12 +0200 |
commit | 2ea5999d07d2a0ab6ad92ccf65524707f2c5e456 (patch) | |
tree | bca99b2b9a578641460d5cf18e92a9cd5ab03f20 /drivers/hid | |
parent | 42d43c92fc577dca59ed74aec7868abec8d6ca6e (diff) |
HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK
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.
Signed-off-by: VinÃcius Angiolucci Reis <angiolucci@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-asus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index f3ecddc519ee..5d57214d8dee 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_DISPLAY_OFF); break; + case 0x35: asus_map_key_clear(KEY_SCREENLOCK); 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; |