I was recently given a 3-battery (second-generation) Apple Wireless keyboard, model A1255. I run Ubuntu 12.04 as my primary OS on my laptop, so I didn't anticipate any compatibility issues. It didn't take me long to run into trouble. During the pairing process, Ubuntu gives a random PIN that must be typed into the keyboard, but it consistently rejected the number. The solution? Hold down the "command" button while typing the PIN number, release the command button, and then press enter. As a side note, put the keyboard in discoverable mode by powering it off, and then holding the power button until the light blinks steadily. I hope that saves someone some grief!