Bug 43135 - Apple wireless keyboard 2011 (ANSI) FN key Bug
Apple wireless keyboard 2011 (ANSI) FN key Bug
Status: RESOLVED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Input Devices
All Linux
: P1 normal
Assigned To: Jiri Kosina
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-20 10:46 UTC by Alexey Kaminsky
Modified: 2012-04-23 16:04 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.3.1-gentoo
Tree: Mainline
Regression: No


Attachments
apple-wireless-ansi-2011.patch (843 bytes, patch)
2012-04-20 10:46 UTC, Alexey Kaminsky
Details | Diff
apple-wireless-ansi-2011.patch (859 bytes, patch)
2012-04-20 14:53 UTC, Alexey Kaminsky
Details | Diff

Description Alexey Kaminsky 2012-04-20 10:46:23 UTC
Created attachment 73002 [details]
apple-wireless-ansi-2011.patch

I bought a new Apple Wireless Keyboard 2011(ANSI, device id 05AC:0255) and enabled it support in the kernel, but nothing happened - Fn-button still not working.

I looked at the source code and saw the missing definition of USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI in apple_devices structure (hid-apple.c file).

Now everything works fine.

Patch to solve the problem is attached below
Thanks, Alexey Kaminsky.
Comment 1 Alexey Kaminsky 2012-04-20 14:46:33 UTC
Comment on attachment 73002 [details]
apple-wireless-ansi-2011.patch

Signed-off-by: Alexey Kaminsky <me@akaminsky.net>
diff -ur linux-3.3-orig/drivers/hid/hid-apple.c linux-3.3/drivers/hid/hid-apple.c
--- linux-3.3-orig/drivers/hid/hid-apple.c	2012-04-20 14:17:34.256877478 +0300
+++ linux-3.3/drivers/hid/hid-apple.c	2012-04-20 17:34:00.915875131 +0300
@@ -458,6 +458,9 @@
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
 			APPLE_ISO_KEYBOARD },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
+				USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI),
+		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
Comment 2 Alexey Kaminsky 2012-04-20 14:53:43 UTC
Created attachment 73023 [details]
apple-wireless-ansi-2011.patch

Formatted according to scripts_checkpatch.pl
Comment 3 Dmitry Torokhov 2012-04-20 21:43:24 UTC
Alexey,

Just post your patch on linux-input@vger.kernel.org and CC Jiri Kosina <jkosina@suse.cz>

Thanks!
Comment 4 Jiri Kosina 2012-04-23 16:04:12 UTC
I have applied the patch, thanks Alexey.

Note You need to log in before you can comment on or make changes to this bug.