People on the internet (e.g. here and here) seem to have noticed that in Windows 7, pairing your Apple Bluetooth Keyboard is not an easy task.
If you find difficulties such as timeouts etc, there is a reason. Windows 7 wants to pair with the keyboard by giving you a code that you have to type on the keyboard, same procedure as in Mac OS X.
Now, the not-so-secret is: this does not work. After selecting the keyboard in the Add Bluetooth device wizard and clicking “forward”, you meet an eternally spinning waiting icon or some other error after a little while. Solution of the problem is to actually type a numeric code like “0000” or another one of your choice on the BT keyboard just after you clicked on “forward” and then hit enter (once or twice…). Windows 7 should ask you to confirm the key you just typed and voilá. If it does not work the first time, switch the keyboard on and off and give it another go.
Worked for me 🙂