View previous topic :: View next topic |
Author |
Message |
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Wed Feb 20, 2008 4:42 pm Post subject: Apple Wireless Keyboard fn (delete, page up, etc) (*SOLVED*) |
|
|
I just got a new Apple Wireless Keyboard (Bluetooth)
Basic keyboard functionality is there, however, the keyboard fn key is not recognized and as such combo keys such as delete, page up, and page down are not functioning, neither are the volume up/down/mute and multimedia keys.
Any ideas for how to get the keys to function?
Thanks _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB
Last edited by OrangeToque on Fri Feb 22, 2008 4:55 pm; edited 1 time in total |
|
Back to top |
|
|
twam Apprentice
Joined: 15 Feb 2005 Posts: 189 Location: Ammerbuch, Germany
|
Posted: Thu Feb 21, 2008 12:09 pm Post subject: |
|
|
Support for the new wireless keyboard was added in kernel 2.6.25-rc2.
If you want to get it working without waiting, you must change some vendor ids in the kernel source files. Look here for further information. |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Thu Feb 21, 2008 3:21 pm Post subject: |
|
|
I've tried the lastest git-sources, and the keys were not recognized.
I've also tried changing the vendor ids to no avail.
Any other thoughts/suggestions ?
Where can/should I post a bug about support inside the kernel? _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
twam Apprentice
Joined: 15 Feb 2005 Posts: 189 Location: Ammerbuch, Germany
|
Posted: Thu Feb 21, 2008 6:43 pm Post subject: |
|
|
In drivers/hid/usbhid/hid-quirks.c you should find
Code: | #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI 0x022c
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO 0x022d
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS 0x022e |
in kernels >2.6.25-rc2. This product ids should be the same as lsusb reports, e.g. 0x0221 for me:
Code: | Bus 002 Device 004: ID 05ac:0221 Apple Computer, Inc. |
To enable Apple fn features, you must set
Code: | CONFIG_USB_HIDINPUT_POWERBOOK=y |
in your kernel config. |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Fri Feb 22, 2008 1:05 am Post subject: |
|
|
Tried that several times, no luck.
The keyboard is bluetooth ... could that affect the way the keypresses are processed?
lsusb does not reveal anything regarding the keyboard,
hidd --show (on the other hand reveals :: )
xx:xx:xx:xx:xx:xx Apple Inc. Keyboard [05ac:022c] connected
basically providing me with the device id of 0x022c which was hardcoded into the hid-quirks.c in the latest git-source (linux-2.6.25-rc2-git4)
Re-compiled that kernel (with the Apple keyboard option) and still no luck. _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
twam Apprentice
Joined: 15 Feb 2005 Posts: 189 Location: Ammerbuch, Germany
|
Posted: Fri Feb 22, 2008 1:22 pm Post subject: |
|
|
I think the problem is that this driver does not work for the bluetooth keyboards. Maybe you should report this and ask on linux-input@vger.kernel.org. |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Fri Feb 22, 2008 4:04 pm Post subject: |
|
|
I've found a big part of the answer here ::
http://www.unionofopposites.com/tech/applebtkb.shtml
Basically I needed to patch net/bluetooth/hidp/core.c ::
Code: |
--- linux-2.6.24-gentoo-r2/net/bluetooth/hidp/core.c.orig 2007-10-26 10:28:59.000000000 -0700
+++ linux-2.6.24-gentoo-r2/net/bluetooth/hidp/core.c 2007-10-26 10:30:59.000000000 -0700
@@ -686,6 +686,7 @@
} hidp_blacklist[] = {
/* Apple wireless Mighty Mouse */
{ 0x05ac, 0x030c, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
+ { 0x05ac, 0x022c, HID_QUIRK_POWERBOOK_HAS_FN },
{ } /* Terminating entry */
};
|
This has enabled basic functionality (Home / End / Delete / Pg up / Pg down)
Multimedia keys function with kernel 2.6.25 (git sources with the above patch [/code]@ this point) but I think I will be able to patch hid-quirks.c in 2.6.24 to get them to function. _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Fri Feb 22, 2008 4:14 pm Post subject: |
|
|
I did run into one problem, and thought I should share the fix ::
All of this works in X, but when I switch to a console, the keyboard doesn't work ? worked before @ the console, now it doesn't ( some keys are ignored, others produce numbers ... )
FIX :: removed numlock from startup
Code: | rc-update del numlock |
_________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Fri Feb 22, 2008 4:54 pm Post subject: |
|
|
You can apply this patch to line up the multimedia keys across the top of the keyboard ::
Code: | --- linux-2.6.24-gentoo-r1/drivers/hid/hid-input.c 2008-01-24 15:58:37.000000000 -0700
+++ linux/drivers/hid/hid-input.c 2008-02-22 09:34:08.000000000 -0700
@@ -101,22 +101,24 @@
#define POWERBOOK_FLAG_FKEY 0x01
static struct hidinput_key_translation powerbook_fn_keys[] = {
- { KEY_BACKSPACE, KEY_DELETE },
- { KEY_F1, KEY_BRIGHTNESSDOWN, POWERBOOK_FLAG_FKEY },
- { KEY_F2, KEY_BRIGHTNESSUP, POWERBOOK_FLAG_FKEY },
- { KEY_F3, KEY_MUTE, POWERBOOK_FLAG_FKEY },
- { KEY_F4, KEY_VOLUMEDOWN, POWERBOOK_FLAG_FKEY },
- { KEY_F5, KEY_VOLUMEUP, POWERBOOK_FLAG_FKEY },
- { KEY_F6, KEY_NUMLOCK, POWERBOOK_FLAG_FKEY },
- { KEY_F7, KEY_SWITCHVIDEOMODE, POWERBOOK_FLAG_FKEY },
- { KEY_F8, KEY_KBDILLUMTOGGLE, POWERBOOK_FLAG_FKEY },
- { KEY_F9, KEY_KBDILLUMDOWN, POWERBOOK_FLAG_FKEY },
- { KEY_F10, KEY_KBDILLUMUP, POWERBOOK_FLAG_FKEY },
- { KEY_UP, KEY_PAGEUP },
- { KEY_DOWN, KEY_PAGEDOWN },
- { KEY_LEFT, KEY_HOME },
- { KEY_RIGHT, KEY_END },
- { }
+ { KEY_BACKSPACE, KEY_DELETE },
+ { KEY_F1, KEY_BRIGHTNESSDOWN, POWERBOOK_FLAG_FKEY },
+ { KEY_F2, KEY_BRIGHTNESSUP, POWERBOOK_FLAG_FKEY },
+ { KEY_F3, KEY_CYCLEWINDOWS, POWERBOOK_FLAG_FKEY }, /* Exposé */
+ { KEY_F4, KEY_WWW, POWERBOOK_FLAG_FKEY }, /* Dashboard */
+ { KEY_F5, KEY_FN_F5 },
+ { KEY_F6, KEY_FN_F6 },
+ { KEY_F7, KEY_PREVIOUSSONG, POWERBOOK_FLAG_FKEY },
+ { KEY_F8, KEY_PLAYPAUSE, POWERBOOK_FLAG_FKEY },
+ { KEY_F9, KEY_NEXTSONG, POWERBOOK_FLAG_FKEY },
+ { KEY_F10, KEY_MUTE, POWERBOOK_FLAG_FKEY },
+ { KEY_F11, KEY_VOLUMEDOWN, POWERBOOK_FLAG_FKEY },
+ { KEY_F12, KEY_VOLUMEUP, POWERBOOK_FLAG_FKEY },
+ { KEY_UP, KEY_PAGEUP },
+ { KEY_DOWN, KEY_PAGEDOWN },
+ { KEY_LEFT, KEY_HOME },
+ { KEY_RIGHT, KEY_END },
+ { }
};
static struct hidinput_key_translation powerbook_numlock_keys[] = {
|
_________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
RobbaZ n00b
Joined: 18 Nov 2004 Posts: 63
|
Posted: Sat Mar 08, 2008 6:45 pm Post subject: |
|
|
Hi! Maybe this isn't the best place to ask those infos.. I've the same keyboard but I've a lot of problem with bluetooth connection...
I've tried to follow this guide: http://gentoo-wiki.com/HOWTO_Use_an_Apple_wireless,_Bluetooth_keyboard but the keyboard is very unresponsive! (sometimes works so slow, sometimes doesn't work at all)
Pleeease.. Can you post me what version of bluez-* are you using and some guide-lines to have it working?
Thank you! |
|
Back to top |
|
|
OrangeToque n00b
Joined: 03 Apr 2006 Posts: 57 Location: Edmonton, Alberta, Canada
|
Posted: Sun Mar 09, 2008 8:36 pm Post subject: |
|
|
Sure.
I'm using::
bluez-utils-3.27
bluez-libs-3.27
The most important part for me is that I am using the old-daemons use flag.
Then I'm using the hidd rc-script to handle the bluetooth connection and input with the keyboard.
Basically follow the directions in the gentoo wiki, except there is no need to add the HIDD_ENABLED=TRUE to your /etc/conf.d/bluetooth, instead, you should startup the HIDD service @ boot ::
Code: | rc-update add hidd default |
My config file for hidd is a follows ::
/etc/conf.d/hidd#
Code: | Bluetooth hidd daemon configuraton file
# Arguments to hidd
HIDD_OPTIONS="--encrypt --connect xx:xx:xx:xx:xx:xx --server --master -t 0"
|
where xx:xx:xx:xx:xx:xx is the address of my keyboard.
In order to pair your device the first time, newer versions of bluez will require either bluez-gnome (which I used (version 0.23)) or kdebluetooth (which I haven't tried and can not verify)
I hope this helps. _________________ OS: Linux 2.6.24-gentoo-r3 x86_64 Gentoo v1.12.11.1 Sound: HDA Intel
CPU: Intel(R) Core(TM)2 Quad CPU Q6700 @ 2.66GHz GenuineIntel
Disk: 2x 300GB 7200.10 SATA II Video: GeForce 7900 GT RAM: 4GB |
|
Back to top |
|
|
RobbaZ n00b
Joined: 18 Nov 2004 Posts: 63
|
Posted: Wed Mar 12, 2008 7:56 pm Post subject: |
|
|
thank you so much!! Now I've got it working!!
I have only some problems with the FN-key (maybe I must patch my italian layout) but I can see the keycode (464) with "showkey" command..
Thank you!
Bye |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|