Apple bluetooth keyboard not pairing with iMac? Check this first.
For no apparent reason, my apple bluetooth keyboard would not pair with my iMac. Everything was working perfectly 24 hours ago - what happened?!
Just in case this is happening to you, let me suggest you check to see if your keyboard has paired with any of your other devices.
I have no idea how it happened but my keyboard had paired and was active with my iPad.
Maybe it was the cats. >**<sigh>**<
The steps to fix a pairing issue can be quite involved, so check this first, just in case you have cats, or weird things just happen in your house too.
iMac (27-inch, Late 2012), macOS Sierra (10.12.1), Bluetooth Keyboard Troubleshooting