From owner-freebsd-usb@FreeBSD.ORG Wed Dec 26 03:04:31 2007 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 BFE6C16A419 for ; Wed, 26 Dec 2007 03:04:31 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by mx1.freebsd.org (Postfix) with ESMTP id 4836B13C44B for ; Wed, 26 Dec 2007 03:04:31 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so1838100uge.37 for ; Tue, 25 Dec 2007 19:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:message-id:from:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:sender; bh=UCxwe7+n6kCj9baE3qu0CoBVSLrxNDb9HCRqGkUSvDQ=; b=JGtekD1NZ+iwYGAcglWBNMUOMZRaUse5zY25+V1EDn5L713cDLuljM7AH0QRaibgAUjVbIL0o1tLzYC5rW15Paj1ybeSOGWhsLxvrw/Bz4+oq+pxY00tNCmTJqMn69bDtI7H0V+/l/B2SqBSCuYEj/3iXlRsgI2ZlJWxSzdEpaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:message-id:from:to:cc:subject:in-reply-to:references:user-agent:mime-version:content-type:sender; b=mh4eeHenGp7cmeqaPsDgQ01Mmrn60zG9zns2i522Eb6zpYSJFJV68y37f7ChSNQLnZZxJkAtwZZBOkQjzSbaYDjdNhpLHtWXAV++1+1yWZZBmIBOJGbwaXxEh/IRXyHg3Sa4HXpgX7CyoKDeffb7GbVeLr2EyzZBR++BfLsgfyU= Received: by 10.67.21.11 with SMTP id y11mr4304301ugi.10.1198638269508; Tue, 25 Dec 2007 19:04:29 -0800 (PST) Received: from epsilon.local.gmail.com ( [83.144.140.64]) by mx.google.com with ESMTPS id c24sm2589387ika.10.2007.12.25.19.04.27 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Dec 2007 19:04:28 -0800 (PST) Date: Wed, 26 Dec 2007 03:03:52 +0000 Message-ID: <86wsr2rwbr.wl%rpaulo@fnop.net> From: Rui Paulo To: Ed Schouten In-Reply-To: <86mys0mkmr.wl%rpaulo@fnop.net> References: <20071224094642.GO1169@hoeg.nl> <86mys0mkmr.wl%rpaulo@fnop.net> User-Agent: Wanderlust/2.15.5 (Almost Unreal) Emacs/22.1 Mule/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: Rui Cc: freebsd-usb@freebsd.org Subject: Re: USB keyboard translation - Apple hardware 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: Wed, 26 Dec 2007 03:04:31 -0000 At Mon, 24 Dec 2007 10:50:52 +0000, Rui Paulo wrote: > > At Mon, 24 Dec 2007 10:46:42 +0100, > Ed Schouten wrote: > > > > [1 ] > > Hello everyone, > > > > One of the things that really made me mad when I got FreeBSD working on > > my Apple MacBook, was that the Fn button on the keyboard doesn't work. > > This means that I don't have the Delete, Page-{Up,Down}, Home and End > > buttons. > > > > I took a look at kbdmap(1), but it turned out you can't add any new > > modifiers, which is needed in this case, because we have a new Fn > > modifier key. Maybe you could solve this in X, but I also work a lot > > outside of X, so I really want to have the translation to be performed > > everywhere. > > > > I've written the following patch for ukbd, which adds a method for > > easily adding translation functions to the driver, to remap keys: > > > > http://g-rave.nl/unix/freebsd/freebsd-ukbd-translate.diff > > > > I tried to keep the code as clean as possible, so I also put some > > #ifdef's around it, so that people who dislike it, can just undef it. > > I've only added the quirks for the Apple MacBook keyboard, but there are > > some other Apple keyboards that have some strange scancodes. I still > > have to add those. > > > > Any comments so far? > > I do like this approach. Oops, I mean "I don't like this approach" Sorry. -- Rui Paulo