Skip to content

Commit 73920f6

Browse files
flukejonesJiri Kosina
authored andcommitted
HID: asus: add keycodes for 0x6a, 0x4b, and 0xc7
These two keys are found on some models with dual display. - 0x6a is intended for controlling the secondary screen brightness. - 0x4b is intended for toggling the arrow keys between arrows and page up / page down. This key is found on a slightly modified keyboard layout. - 0xc7 is intended to cycle through keybvoard brightnesses (upwards) but there is not suitable existing code for this behaviour. Using `KEY_KBDILLUMTOGGLE` is different behaviour to Windows but at least is picked up by many desktops already. Signed-off-by: Luke D. Jones <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 74e47b2 commit 73920f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/hid/hid-asus.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,7 @@ static int asus_input_mapping(struct hid_device *hdev,
884884
case 0xb5: asus_map_key_clear(KEY_CALC); break;
885885
case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP); break;
886886
case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN); break;
887+
case 0xc7: asus_map_key_clear(KEY_KBDILLUMTOGGLE); break;
887888

888889
/* ASUS touchpad toggle */
889890
case 0x6b: asus_map_key_clear(KEY_F21); break;
@@ -912,6 +913,12 @@ static int asus_input_mapping(struct hid_device *hdev,
912913
/* Fn+Right Aura mode next on N-Key keyboard */
913914
case 0xb3: asus_map_key_clear(KEY_PROG3); break;
914915

916+
/* Screenpad toggle on N-Key keyboard */
917+
case 0x6a: asus_map_key_clear(KEY_F13); break;
918+
919+
/* Arrows/Page-up/Down toggle on N-Key keyboard */
920+
case 0x4b: asus_map_key_clear(KEY_F14); break;
921+
915922
default:
916923
/* ASUS lazily declares 256 usages, ignore the rest,
917924
* as some make the keyboard appear as a pointer device. */

0 commit comments

Comments
 (0)