Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH] Add Apple wireless keyboard 2011 JIS model support
@ 2014-02-03  5:19 Huei-Horng Yo
  0 siblings, 0 replies; only message in thread
From: Huei-Horng Yo @ 2014-02-03  5:19 UTC (permalink / raw)
  To: linux-input

Hello,

I bought a Apple wireless keyboard 2011 JIS model,
the fn key isn't work as expected in Linux 3.12.9 (current version I am 
using),
I then read the kernel source code, found that it was not listed in HID 
IDs list,
so that I made a patch as below to add the model support.

P.S: Also reported in Bugzilla: 
https://bugzilla.kernel.org/show_bug.cgi?id=69681


Thanks,
Huei-Horng Yo



apple-alu-wireless-kbd-jis.patch

Signed-off-by: Huei-Horng Yo <hiroshi@ghostsinthelab.org>
diff -uprN linux-3.12.vanilla/drivers/hid/hid-apple.c 
linux-3.12/drivers/hid/hid-apple.c
--- linux-3.12.vanilla/drivers/hid/hid-apple.c  2013-11-04 
07:41:51.000000000 +0800
+++ linux-3.12/drivers/hid/hid-apple.c  2014-02-01 01:15:37.532768035 +0800
@@ -447,6 +447,9 @@ static const struct hid_device_id apple_
         { 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_2011_JIS),
+               .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),
diff -uprN linux-3.12.vanilla/drivers/hid/hid-core.c 
linux-3.12/drivers/hid/hid-core.c
--- linux-3.12.vanilla/drivers/hid/hid-core.c   2013-11-04 
07:41:51.000000000 +0800
+++ linux-3.12/drivers/hid/hid-core.c   2014-02-01 01:15:37.532768035 +0800
@@ -1680,6 +1680,7 @@ static const struct hid_device_id hid_ha
         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) },
         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, 
USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
         { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, 
USB_DEVICE_ID_AUREAL_W01RN) },
diff -uprN linux-3.12.vanilla/drivers/hid/hid-ids.h 
linux-3.12/drivers/hid/hid-ids.h
--- linux-3.12.vanilla/drivers/hid/hid-ids.h    2013-11-04 
07:41:51.000000000 +0800
+++ linux-3.12/drivers/hid/hid-ids.h    2014-02-01 01:15:37.532768035 +0800
@@ -135,6 +135,7 @@
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI  0x0255
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS   0x0257
  #define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI   0x0290
  #define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO    0x0291
  #define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS    0x0292

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-03  5:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03  5:19 [PATCH] Add Apple wireless keyboard 2011 JIS model support Huei-Horng Yo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox