Skip to content

Commit 2ea5999

Browse files
Vinícius Angiolucci ReisJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 42d43c9 commit 2ea5999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-asus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ static int asus_input_mapping(struct hid_device *hdev,
854854
switch (usage->hid & HID_USAGE) {
855855
case 0x10: asus_map_key_clear(KEY_BRIGHTNESSDOWN); break;
856856
case 0x20: asus_map_key_clear(KEY_BRIGHTNESSUP); break;
857-
case 0x35: asus_map_key_clear(KEY_DISPLAY_OFF); break;
857+
case 0x35: asus_map_key_clear(KEY_SCREENLOCK); break;
858858
case 0x6c: asus_map_key_clear(KEY_SLEEP); break;
859859
case 0x7c: asus_map_key_clear(KEY_MICMUTE); break;
860860
case 0x82: asus_map_key_clear(KEY_CAMERA); break;

0 commit comments

Comments
 (0)