Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Dec 2007 10:46:42 +0100
From:      Ed Schouten <ed@fxq.nl>
To:        freebsd-usb@freebsd.org
Cc:        rpaulo@freebsd.org
Subject:   USB keyboard translation - Apple hardware
Message-ID:  <20071224094642.GO1169@hoeg.nl>

next in thread | raw e-mail | index | archive | help

--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 <ed@fxq.nl>
 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071224094642.GO1169>