Skip to content

Commit 479912f

Browse files
oxplotgregkh
authored andcommitted
HID: apple: Add support for recent firmware on Magic Keyboards
[ Upstream commit e433be9 ] Magic Keyboards with more recent firmware (0x0100) report Fn key differently. Without this patch, Fn key may not behave as expected and may not be configurable via hid_apple fnmode module parameter. Signed-off-by: Mansour Behabadi <[email protected]> Signed-off-by: Jiri Kosina <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f2a1853 commit 479912f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/hid/hid-apple.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,8 @@ static int apple_input_mapping(struct hid_device *hdev, struct hid_input *hi,
341341
unsigned long **bit, int *max)
342342
{
343343
if (usage->hid == (HID_UP_CUSTOM | 0x0003) ||
344-
usage->hid == (HID_UP_MSVENDOR | 0x0003)) {
344+
usage->hid == (HID_UP_MSVENDOR | 0x0003) ||
345+
usage->hid == (HID_UP_HPVENDOR2 | 0x0003)) {
345346
/* The fn key on Apple USB keyboards */
346347
set_bit(EV_REP, hi->input->evbit);
347348
hid_map_usage_clear(hi, usage, bit, max, EV_KEY, KEY_FN);

0 commit comments

Comments
 (0)