USB keyboard translation - Apple hardware

Ed Schouten ed at fxq.nl
Mon Dec 24 01:47:06 PST 2007


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?

-- 
 Ed Schouten <ed at fxq.nl>
 WWW: http://g-rave.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-usb/attachments/20071224/06b7a735/attachment.pgp


More information about the freebsd-usb mailing list