This can occur if you do not press the Return key after you enter the 8 digit passkey, or if you press other keys on the Apple Wireless Keyboard before you enter the PIN code during pairing in Bluetooth Setup Assistant.
To resolve this issue:
- Turn the Apple Wireless Keyboard off.
- For an aluminum Apple Wireless Keyboard, hold the keyboard's power button for more than 3 seconds.
- For a white Apple Wireless Keyboard, turn over the keyboard, and turn the power switch to the off position.
- Click the "Continue" button as the Setup Assistant instructs.
- Power the Apple Wireless Keyboard back on.
- Enter the 8-digit passkey and press Return. Important: You MUST press Return after you enter the 8 digit code.
See these articles for more information: