Difficulty pairing older model A1255 bluetooth keyboard
When pairing a bluetooth Apple keyboard with a Mac, Bluetooth preferences will ask you to type a numeric passcode followed by the return key on the new keyboard. The display will normally highlight the character you should type and advance to the next character as you type, like so:
However, if the keyboard in question is the older model A1255 (Apple’s second gen. wireless keyboard, released in 2007, uses 3 batteries), the expected highlighting doesn't happen. Don’t despair, just type the numbers and then press return. If you typed it correctly, the keyboard will pair successfully.
I just tested the above with two older Macs, one running High Sierra (10.13.6 on a mid 2010 Mac mini) and the other running Big Sur (11.7.8 on a late 2014 iMac). In both cases, the A1255 paired successfully with no highlighting during entry. By contrast, the model A1314 (2 batteries) which I was also testing showed highlighting during pairing (and also paired successfully with both Macs).
I’m leaving this note here after reading another thread in which the original poster assumed that some or all of the number keys were broken and gave up.
Earlier Mac models