Date: Sat, 16 May 2009 21:12:57 +0200 From: Christoph Langguth <christoph@rosenkeller.org> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: How to add support for Macbook Pro (USB) keyboard? Message-ID: <4A0F1039.7050403@rosenkeller.org> In-Reply-To: <200905162001.30735.hselasky@c2i.net> References: <4A0DC89C.6010708@rosenkeller.org> <200905160829.18377.hselasky@c2i.net> <4A0EDB45.8020903@rosenkeller.org> <200905162001.30735.hselasky@c2i.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hans Petter, wow!! I don't know what kind of voodoo you actually did there, but it works perfectly! :-D Thanks! Just two final little comments and two questions: line 463 in ukbd.c should actually read case 0x28: return 0x49; /* RETURN -> INSERT */ instead of case 0x2c: return 0x49; /* SPACE -> INSERT */ I just realized after writing it that all other OS's (MacOS, Windows, Linux) map Fn+Enter to INS, so I guess it would be best to stick with that convention and not to introduce new idiosyncrasies... and: in ukbd_apple_swap() the comments are misleading (Well actually the parameter name may have been misleading in the first place, since I guess it's scancodes, not keycodes, at that level, right? Anyway, it's not the "5" and "d" keys that are being swapped, but the one just left of the "1" (^ and ° on a german keyboard, ~ on the US one if i'm correct), and the one between the left shift and the Y/Z key (< and > on german kbd, not sure about US). Finally, for curiosity, since I didn't really get how the code works: how do you know reliably whether to toggle the APPLE_SWAP flag? Does the HID descriptor give you information about that "anomaly"? (I'm just wondering whether it wouldn't mistakenly swap the keys on unaffected Apple keyboards) And... one final issue here, which is low-priority for me but would be the topping on the cake: CAPS lock is functioning normally, but the LED does not light up when engaged. Is there any way to fix this? Thanks a lot & cheers! Chris Hans Petter Selasky schrieb: > Hi Christoph, > > Download the two patched files from P4, ukbd.c and usbhid.h, and put them > under sys/dev/usb/input and sys/dev/usb/ respectivly. > > Then recompile the ukbd module and/or kernel. > > The attach failure was due to a bug in the previous patch where I had > forgotten to update N_TRANSFER. > > http://perforce.freebsd.org/chv.cgi?CH=162165 > > I've tried to make your patch more formal so that we don't have to list the > VID+PID for every Apple Keyboard around. > > --HPS >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A0F1039.7050403>