As for the numlock problem, it's very obvious from viewing the code in
the drivers/hid/hid-input.c file what is going on. Basically, when you
hit the numlock key on an apple keyboard that has a real keypad, it
doesn't actually care that you have a real keypad and switches the
keyboard into powerbook style keypad mode. That is the letters on the
right side of the keyboard take on the keypad functionality. This is
obviously wrong for those apple keyboards that actually do have a keypad.
Here's another patch that's probably more correct than the one I posted
earlier. When the numlock key is pressed, it checks the model of the
keyboard to decide whether or not to change the key mapping. This is
still probably wrong however.
As long as the precedent for default apple behavior has been set with
the whole FN/F-Key business, keyboards that have keypads SHOULD be stuck
on numlock. Unfortunately, I'm no kernel programmer, but I'll keep
working on this.
I have also attached a kernel module file for amd64 machines. Move this
file to /lib/modules/2.6.24-12-generic/kernel/drivers/hid/hid.ko and
reboot only if you're having this numlock issue and only if you're
running amd64 ubuntu. The i386 kernel module is still compiling, but I
will post it here when its done and tested.