From owner-freebsd-usb@FreeBSD.ORG Sat May 16 19:55:50 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36940106564A for ; Sat, 16 May 2009 19:55:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swip.net [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id C3E5B8FC18 for ; Sat, 16 May 2009 19:55:49 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=TUa3oeW83E4A:10 a=ABjp9MRm-CUA:10 a=IhXH_RObNxorMXtay6IA:9 a=qOWZz47KIIGJOfWoQqUA:7 a=E8PIiKJs0aOtHpCOQPgfe6PeDgkA:4 Received: from [193.217.167.6] (account mc467741@c2i.net HELO [10.0.0.229]) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 496143856; Sat, 16 May 2009 21:55:47 +0200 From: Hans Petter Selasky To: Christoph Langguth Date: Sat, 16 May 2009 21:58:21 +0200 User-Agent: KMail/1.9.7 References: <4A0DC89C.6010708@rosenkeller.org> <200905162001.30735.hselasky@c2i.net> <4A0F1039.7050403@rosenkeller.org> In-Reply-To: <4A0F1039.7050403@rosenkeller.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200905162158.22210.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: How to add support for Macbook Pro (USB) keyboard? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2009 19:55:50 -0000 On Saturday 16 May 2009, Christoph Langguth wrote: > Hi Hans Petter, > > 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... =46ixed. > > 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 =B0 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). =46ixed. > > 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) I was just taking your example. I assume that Apple make the keyboards alik= e.=20 If not we will have to adjust. I did not look too close at the HID=20 descriptor. I just assume that when the special HID item is present, which= =20 indicates the EJECT, then it is an Apple keyboard and that it works like an= =20 Apple keyboard. > > 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? Can you find the bit or byte that is changing in the report which correspon= ds=20 to the CAPS lock key? Also don't forget to print the first byte which is th= e=20 ID byte. =2D-HPS