30
30
#include "hid-ids.h"
31
31
32
32
#define APPLE_RDESC_JIS BIT(0)
33
- #define APPLE_IGNORE_MOUSE BIT(1)
33
+ /* BIT(1) reserved, was: APPLE_IGNORE_MOUSE */
34
34
#define APPLE_HAS_FN BIT(2)
35
35
/* BIT(3) reserved, was: APPLE_HIDDEV */
36
36
#define APPLE_ISO_TILDE_QUIRK BIT(4)
42
42
#define APPLE_BACKLIGHT_CTL BIT(10)
43
43
#define APPLE_IS_NON_APPLE BIT(11)
44
44
#define APPLE_MAGIC_BACKLIGHT BIT(12)
45
+ #define APPLE_DISABLE_FKEYS BIT(13)
45
46
46
- #define APPLE_FLAG_FKEY 0x01
47
+ #define APPLE_FLAG_FKEY BIT(0)
48
+ #define APPLE_FLAG_TB_FKEY BIT(1)
47
49
48
50
#define HID_COUNTRY_INTERNATIONAL_ISO 13
49
51
#define APPLE_BATTERY_TIMEOUT_MS 60000
55
57
static unsigned int fnmode = 3 ;
56
58
module_param (fnmode , uint , 0644 );
57
59
MODULE_PARM_DESC (fnmode , "Mode of fn key on Apple keyboards (0 = disabled, "
58
- "1 = fkeyslast, 2 = fkeysfirst, [3] = auto)" );
60
+ "1 = fkeyslast, 2 = fkeysfirst, [3] = auto, 4 = fkeysdisabled )" );
59
61
60
62
static int iso_layout = -1 ;
61
63
module_param (iso_layout , int , 0644 );
@@ -89,6 +91,19 @@ struct apple_sc_backlight {
89
91
struct hid_device * hdev ;
90
92
};
91
93
94
+ struct apple_backlight_config_report {
95
+ u8 report_id ;
96
+ u8 version ;
97
+ u16 backlight_off , backlight_on_min , backlight_on_max ;
98
+ };
99
+
100
+ struct apple_backlight_set_report {
101
+ u8 report_id ;
102
+ u8 version ;
103
+ u16 backlight ;
104
+ u16 rate ;
105
+ };
106
+
92
107
struct apple_magic_backlight {
93
108
struct led_classdev cdev ;
94
109
struct hid_report * brightness ;
@@ -108,7 +123,7 @@ struct apple_sc {
108
123
struct apple_key_translation {
109
124
u16 from ;
110
125
u16 to ;
111
- u8 flags ;
126
+ unsigned long flags ;
112
127
};
113
128
114
129
static const struct apple_key_translation magic_keyboard_alu_fn_keys [] = {
@@ -152,21 +167,7 @@ static const struct apple_key_translation magic_keyboard_2015_fn_keys[] = {
152
167
{ }
153
168
};
154
169
155
- struct apple_backlight_config_report {
156
- u8 report_id ;
157
- u8 version ;
158
- u16 backlight_off , backlight_on_min , backlight_on_max ;
159
- };
160
-
161
- struct apple_backlight_set_report {
162
- u8 report_id ;
163
- u8 version ;
164
- u16 backlight ;
165
- u16 rate ;
166
- };
167
-
168
-
169
- static const struct apple_key_translation apple2021_fn_keys [] = {
170
+ static const struct apple_key_translation magic_keyboard_2021_and_2024_fn_keys [] = {
170
171
{ KEY_BACKSPACE , KEY_DELETE },
171
172
{ KEY_ENTER , KEY_INSERT },
172
173
{ KEY_F1 , KEY_BRIGHTNESSDOWN , APPLE_FLAG_FKEY },
@@ -212,19 +213,19 @@ static const struct apple_key_translation macbookair_fn_keys[] = {
212
213
static const struct apple_key_translation macbookpro_no_esc_fn_keys [] = {
213
214
{ KEY_BACKSPACE , KEY_DELETE },
214
215
{ KEY_ENTER , KEY_INSERT },
215
- { KEY_GRAVE , KEY_ESC },
216
- { KEY_1 , KEY_F1 },
217
- { KEY_2 , KEY_F2 },
218
- { KEY_3 , KEY_F3 },
219
- { KEY_4 , KEY_F4 },
220
- { KEY_5 , KEY_F5 },
221
- { KEY_6 , KEY_F6 },
222
- { KEY_7 , KEY_F7 },
223
- { KEY_8 , KEY_F8 },
224
- { KEY_9 , KEY_F9 },
225
- { KEY_0 , KEY_F10 },
226
- { KEY_MINUS , KEY_F11 },
227
- { KEY_EQUAL , KEY_F12 },
216
+ { KEY_GRAVE , KEY_ESC , APPLE_FLAG_TB_FKEY },
217
+ { KEY_1 , KEY_F1 , APPLE_FLAG_TB_FKEY },
218
+ { KEY_2 , KEY_F2 , APPLE_FLAG_TB_FKEY },
219
+ { KEY_3 , KEY_F3 , APPLE_FLAG_TB_FKEY },
220
+ { KEY_4 , KEY_F4 , APPLE_FLAG_TB_FKEY },
221
+ { KEY_5 , KEY_F5 , APPLE_FLAG_TB_FKEY },
222
+ { KEY_6 , KEY_F6 , APPLE_FLAG_TB_FKEY },
223
+ { KEY_7 , KEY_F7 , APPLE_FLAG_TB_FKEY },
224
+ { KEY_8 , KEY_F8 , APPLE_FLAG_TB_FKEY },
225
+ { KEY_9 , KEY_F9 , APPLE_FLAG_TB_FKEY },
226
+ { KEY_0 , KEY_F10 , APPLE_FLAG_TB_FKEY },
227
+ { KEY_MINUS , KEY_F11 , APPLE_FLAG_TB_FKEY },
228
+ { KEY_EQUAL , KEY_F12 , APPLE_FLAG_TB_FKEY },
228
229
{ KEY_UP , KEY_PAGEUP },
229
230
{ KEY_DOWN , KEY_PAGEDOWN },
230
231
{ KEY_LEFT , KEY_HOME },
@@ -235,18 +236,18 @@ static const struct apple_key_translation macbookpro_no_esc_fn_keys[] = {
235
236
static const struct apple_key_translation macbookpro_dedicated_esc_fn_keys [] = {
236
237
{ KEY_BACKSPACE , KEY_DELETE },
237
238
{ KEY_ENTER , KEY_INSERT },
238
- { KEY_1 , KEY_F1 },
239
- { KEY_2 , KEY_F2 },
240
- { KEY_3 , KEY_F3 },
241
- { KEY_4 , KEY_F4 },
242
- { KEY_5 , KEY_F5 },
243
- { KEY_6 , KEY_F6 },
244
- { KEY_7 , KEY_F7 },
245
- { KEY_8 , KEY_F8 },
246
- { KEY_9 , KEY_F9 },
247
- { KEY_0 , KEY_F10 },
248
- { KEY_MINUS , KEY_F11 },
249
- { KEY_EQUAL , KEY_F12 },
239
+ { KEY_1 , KEY_F1 , APPLE_FLAG_TB_FKEY },
240
+ { KEY_2 , KEY_F2 , APPLE_FLAG_TB_FKEY },
241
+ { KEY_3 , KEY_F3 , APPLE_FLAG_TB_FKEY },
242
+ { KEY_4 , KEY_F4 , APPLE_FLAG_TB_FKEY },
243
+ { KEY_5 , KEY_F5 , APPLE_FLAG_TB_FKEY },
244
+ { KEY_6 , KEY_F6 , APPLE_FLAG_TB_FKEY },
245
+ { KEY_7 , KEY_F7 , APPLE_FLAG_TB_FKEY },
246
+ { KEY_8 , KEY_F8 , APPLE_FLAG_TB_FKEY },
247
+ { KEY_9 , KEY_F9 , APPLE_FLAG_TB_FKEY },
248
+ { KEY_0 , KEY_F10 , APPLE_FLAG_TB_FKEY },
249
+ { KEY_MINUS , KEY_F11 , APPLE_FLAG_TB_FKEY },
250
+ { KEY_EQUAL , KEY_F12 , APPLE_FLAG_TB_FKEY },
250
251
{ KEY_UP , KEY_PAGEUP },
251
252
{ KEY_DOWN , KEY_PAGEDOWN },
252
253
{ KEY_LEFT , KEY_HOME },
@@ -425,7 +426,12 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
425
426
unsigned int real_fnmode ;
426
427
427
428
if (fnmode == 3 ) {
428
- real_fnmode = (asc -> quirks & APPLE_IS_NON_APPLE ) ? 2 : 1 ;
429
+ if (asc -> quirks & APPLE_DISABLE_FKEYS )
430
+ real_fnmode = 4 ;
431
+ else if (asc -> quirks & APPLE_IS_NON_APPLE )
432
+ real_fnmode = 2 ;
433
+ else
434
+ real_fnmode = 1 ;
429
435
} else {
430
436
real_fnmode = fnmode ;
431
437
}
@@ -466,42 +472,54 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
466
472
asc -> fn_on = !!value ;
467
473
468
474
if (real_fnmode ) {
469
- if (hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI ||
470
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO ||
471
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS ||
472
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI ||
473
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO ||
474
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS ||
475
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI ||
476
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO ||
477
- hid -> product == USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS )
475
+ switch (hid -> product ) {
476
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI :
477
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO :
478
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS :
479
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI :
480
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO :
481
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS :
482
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI :
483
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO :
484
+ case USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS :
478
485
table = magic_keyboard_alu_fn_keys ;
479
- else if (hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015 ||
480
- hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015 )
486
+ break ;
487
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2015 :
488
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2015 :
481
489
table = magic_keyboard_2015_fn_keys ;
482
- else if ( hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 ||
483
- hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ||
484
- hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ||
485
- hid -> product == USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 )
486
- table = apple2021_fn_keys ;
487
- else if ( hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 ||
488
- hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 ||
489
- hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 )
490
- table = macbookpro_no_esc_fn_keys ;
491
- else if ( hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K ||
492
- hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 ||
493
- hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F )
494
- table = macbookpro_dedicated_esc_fn_keys ;
495
- else if ( hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K ||
496
- hid -> product == USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K )
497
- table = apple_fn_keys ;
498
- else if ( hid -> product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
499
- hid -> product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS )
500
- table = macbookair_fn_keys ;
501
- else if ( hid -> product < 0x21d || hid -> product >= 0x300 )
502
- table = powerbook_fn_keys ;
503
- else
490
+ break ;
491
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 :
492
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 :
493
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 :
494
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 :
495
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024 :
496
+ case USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024 :
497
+ table = magic_keyboard_2021_and_2024_fn_keys ;
498
+ break ;
499
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 :
500
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 :
501
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 :
502
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT :
503
+ table = macbookpro_no_esc_fn_keys ;
504
+ break ;
505
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F :
506
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K :
507
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 :
508
+ table = macbookpro_dedicated_esc_fn_keys ;
509
+ break ;
510
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K :
511
+ case USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K :
504
512
table = apple_fn_keys ;
513
+ break ;
514
+ default :
515
+ if (hid -> product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
516
+ hid -> product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS )
517
+ table = macbookair_fn_keys ;
518
+ else if (hid -> product < 0x21d || hid -> product >= 0x300 )
519
+ table = powerbook_fn_keys ;
520
+ else
521
+ table = apple_fn_keys ;
522
+ }
505
523
506
524
trans = apple_find_translation (table , code );
507
525
@@ -524,8 +542,16 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
524
542
do_translate = asc -> fn_on ;
525
543
break ;
526
544
default :
527
- /* should never happen */
545
+ /* case 4 */
546
+ do_translate = false;
547
+ }
548
+ } else if (trans -> flags & APPLE_FLAG_TB_FKEY ) {
549
+ switch (real_fnmode ) {
550
+ case 4 :
528
551
do_translate = false;
552
+ break ;
553
+ default :
554
+ do_translate = asc -> fn_on ;
529
555
}
530
556
} else {
531
557
do_translate = asc -> fn_on ;
@@ -682,7 +708,7 @@ static void apple_setup_input(struct input_dev *input)
682
708
apple_setup_key_translation (input , apple_iso_keyboard );
683
709
apple_setup_key_translation (input , magic_keyboard_alu_fn_keys );
684
710
apple_setup_key_translation (input , magic_keyboard_2015_fn_keys );
685
- apple_setup_key_translation (input , apple2021_fn_keys );
711
+ apple_setup_key_translation (input , magic_keyboard_2021_and_2024_fn_keys );
686
712
apple_setup_key_translation (input , macbookpro_no_esc_fn_keys );
687
713
apple_setup_key_translation (input , macbookpro_dedicated_esc_fn_keys );
688
714
}
@@ -890,7 +916,8 @@ static int apple_magic_backlight_init(struct hid_device *hdev)
890
916
backlight -> brightness = report_enum -> report_id_hash [APPLE_MAGIC_REPORT_ID_BRIGHTNESS ];
891
917
backlight -> power = report_enum -> report_id_hash [APPLE_MAGIC_REPORT_ID_POWER ];
892
918
893
- if (!backlight -> brightness || !backlight -> power )
919
+ if (!backlight -> brightness || backlight -> brightness -> maxfield < 2 ||
920
+ !backlight -> power || backlight -> power -> maxfield < 2 )
894
921
return - ENODEV ;
895
922
896
923
backlight -> cdev .name = ":white:" LED_FUNCTION_KBD_BACKLIGHT ;
@@ -1129,19 +1156,25 @@ static const struct hid_device_id apple_devices[] = {
1129
1156
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J140K ),
1130
1157
.driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
1131
1158
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J132 ),
1132
- .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
1159
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
1160
+ APPLE_DISABLE_FKEYS },
1133
1161
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680 ),
1134
- .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
1162
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
1163
+ APPLE_DISABLE_FKEYS },
1164
+ { HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J680_ALT ),
1165
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
1166
+ APPLE_DISABLE_FKEYS },
1135
1167
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J213 ),
1136
- .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK },
1168
+ .driver_data = APPLE_HAS_FN | APPLE_BACKLIGHT_CTL | APPLE_ISO_TILDE_QUIRK |
1169
+ APPLE_DISABLE_FKEYS },
1137
1170
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J214K ),
1138
- .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1171
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
1139
1172
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J223 ),
1140
- .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1173
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
1141
1174
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J230K ),
1142
1175
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1143
1176
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_WELLSPRINGT2_J152F ),
1144
- .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1177
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_DISABLE_FKEYS },
1145
1178
{ HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI ),
1146
1179
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
1147
1180
{ HID_BLUETOOTH_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO ),
@@ -1157,10 +1190,6 @@ static const struct hid_device_id apple_devices[] = {
1157
1190
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1158
1191
{ HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2021 ),
1159
1192
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1160
- { HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ),
1161
- .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1162
- { HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ),
1163
- .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1164
1193
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ),
1165
1194
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1166
1195
{ HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2021 ),
@@ -1169,6 +1198,18 @@ static const struct hid_device_id apple_devices[] = {
1169
1198
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1170
1199
{ HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2021 ),
1171
1200
.driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1201
+ { HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ),
1202
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1203
+ { HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_2024 ),
1204
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1205
+ { HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024 ),
1206
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1207
+ { HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_FINGERPRINT_2024 ),
1208
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1209
+ { HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024 ),
1210
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK | APPLE_RDESC_BATTERY },
1211
+ { HID_BLUETOOTH_DEVICE (BT_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_2024 ),
1212
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_TILDE_QUIRK },
1172
1213
{ HID_USB_DEVICE (USB_VENDOR_ID_APPLE , USB_DEVICE_ID_APPLE_TOUCHBAR_BACKLIGHT ),
1173
1214
.driver_data = APPLE_MAGIC_BACKLIGHT },
1174
1215
0 commit comments