How do I pair apple wireless keyboard with windows 10
After trying 15 times in vain, here is the method that worked for me (source)


Go to "Add Bluetooth or other device" 
Find the wireless keyboard and double click on it.
When prompted for a pin, enter anything on the screen, I used "123123". I dont know what else will work.
NOW IS THE IMPORTANT PART.
HIT 'Connect' on your screen and IMMEDIATELY enter '123123' + ENTER/RETURN on the wireless apple keyboard, and you should be paired.
If you have issues, turn off Bluetooth and restart the wireless
keyboard and repeat the process.