Skip to content

Commit e6c7e27

Browse files
flukejonesJiri Kosina
authored andcommitted
HID: asus: reformat the hotkey mapping block
Older formatting of this block was beginning to get somewhat cluttered. Condensing the block and putting comments to the side makes it easier to read and scan the scancodes plus keycodes. Signed-off-by: Luke D. Jones <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 73920f6 commit e6c7e27

File tree

1 file changed

+12
-32
lines changed

1 file changed

+12
-32
lines changed

drivers/hid/hid-asus.c

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -886,38 +886,18 @@ static int asus_input_mapping(struct hid_device *hdev,
886886
case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN); break;
887887
case 0xc7: asus_map_key_clear(KEY_KBDILLUMTOGGLE); break;
888888

889-
/* ASUS touchpad toggle */
890-
case 0x6b: asus_map_key_clear(KEY_F21); break;
889+
case 0x6b: asus_map_key_clear(KEY_F21); break; /* ASUS touchpad toggle */
890+
case 0x38: asus_map_key_clear(KEY_PROG1); break; /* ROG key */
891+
case 0xba: asus_map_key_clear(KEY_PROG2); break; /* Fn+C ASUS Splendid */
892+
case 0x5c: asus_map_key_clear(KEY_PROG3); break; /* Fn+Space Power4Gear */
893+
case 0x99: asus_map_key_clear(KEY_PROG4); break; /* Fn+F5 "fan" symbol */
894+
case 0xae: asus_map_key_clear(KEY_PROG4); break; /* Fn+F5 "fan" symbol */
895+
case 0x92: asus_map_key_clear(KEY_CALC); break; /* Fn+Ret "Calc" symbol */
896+
case 0xb2: asus_map_key_clear(KEY_PROG2); break; /* Fn+Left previous aura */
897+
case 0xb3: asus_map_key_clear(KEY_PROG3); break; /* Fn+Left next aura */
898+
case 0x6a: asus_map_key_clear(KEY_F13); break; /* Screenpad toggle */
899+
case 0x4b: asus_map_key_clear(KEY_F14); break; /* Arrows/Pg-Up/Dn toggle */
891900

892-
/* ROG key */
893-
case 0x38: asus_map_key_clear(KEY_PROG1); break;
894-
895-
/* Fn+C ASUS Splendid */
896-
case 0xba: asus_map_key_clear(KEY_PROG2); break;
897-
898-
/* Fn+Space Power4Gear Hybrid */
899-
case 0x5c: asus_map_key_clear(KEY_PROG3); break;
900-
901-
/* Fn+F5 "fan" symbol on FX503VD */
902-
case 0x99: asus_map_key_clear(KEY_PROG4); break;
903-
904-
/* Fn+F5 "fan" symbol on N-Key keyboard */
905-
case 0xae: asus_map_key_clear(KEY_PROG4); break;
906-
907-
/* Fn+Ret "Calc" symbol on N-Key keyboard */
908-
case 0x92: asus_map_key_clear(KEY_CALC); break;
909-
910-
/* Fn+Left Aura mode previous on N-Key keyboard */
911-
case 0xb2: asus_map_key_clear(KEY_PROG2); break;
912-
913-
/* Fn+Right Aura mode next on N-Key keyboard */
914-
case 0xb3: asus_map_key_clear(KEY_PROG3); break;
915-
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;
921901

922902
default:
923903
/* ASUS lazily declares 256 usages, ignore the rest,
@@ -1320,4 +1300,4 @@ static struct hid_driver asus_driver = {
13201300
};
13211301
module_hid_driver(asus_driver);
13221302

1323-
MODULE_LICENSE("GPL");
1303+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)