From owner-freebsd-usb@FreeBSD.ORG Mon Dec 24 09:47:06 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 A6B5C16A41A; Mon, 24 Dec 2007 09:47:06 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id 4AB0113C474; Mon, 24 Dec 2007 09:47:06 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E896E1CCC9; Mon, 24 Dec 2007 10:46:42 +0100 (CET) Date: Mon, 24 Dec 2007 10:46:42 +0100 From: Ed Schouten To: freebsd-usb@freebsd.org Message-ID: <20071224094642.GO1169@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zxEKvxCKojqA/Afl" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Cc: rpaulo@freebsd.org Subject: 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: Mon, 24 Dec 2007 09:47:06 -0000 --zxEKvxCKojqA/Afl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? --=20 Ed Schouten WWW: http://g-rave.nl/ --zxEKvxCKojqA/Afl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFHb4AC52SDGA2eCwURAiJHAJ0e3FLAqv1hKJu/QLCocCxb4b1O/ACcDVEt OOQ59YkhtkehmlnZGDSSWxs= =a7+O -----END PGP SIGNATURE----- --zxEKvxCKojqA/Afl--