Apple Mac OSX wireless bluetooth keyboard refuses to connect to PC

I love my Apple Macs but they do seem to suffer a frustrating problem after a reboot. The keyboard is powered, with a full batteries but it refuses to connect and the system does not see the keyboard.

Up comes that annoying message:
 * Bluetooth Keyboard Setup


 * There isn't a keyboard connected.


 * Looking for a wireless keyboard. If one is found it will be paired with your computer.


 * If you are attempting to use a wireless keyboard and it isn;t found, make sure it is turned on and "discoverable." If you are using an Apple wireless keyboard, turn on your keyboard. If you are trying to use a non-Apple wireless keyboard, see the documentation that came with the keyboard.

 There is no problem with the keyboard, I have tried other keyboards and have the same issues.

Solutions to try to solve this problem

 * 1) Power off the keyboard by holding the keyboard power button down for more than 3 seconds, then switch the keyboard back on again. The green led with light momentarily to show that it is powered on again. Wait a few minutes to see if the system recognises the keyboard.
 * 2) Try logging in as Guest.  This normally works for me.  Instantly the keyboard is recognised and then paired with the PC.  When logging out as Guest a logging in again as a normal user the problem is resolved.
 * 3) Remove the batteries from the bluetooth mouse and the bluetooth keyboard together.  Reboot the system by holding down the PC power button for more than 5 seconds.  When the system restarts it knows that there are no input devices connected at all and goes through the new user setup for input devices, rather that relying on the .plist settings.
 * 4) Remove the batteries from any nearby Apple keyboards as they may be confusing your Macintosh OSX PC.  Bluetooth devices can have a range of more than 15 feet under good conditions.
 * 5) Lastly, if your system is on a network and you have Screensharing enabled, you may be able to change user settings from a remote PC on the same network.

I did once switch bluetooth off then shutdown the system by holding down the power button. When the system rebooted, it never tried to connect to the keyboard at all. The solution to this was as #3 above, remove all batteries, or #5, switch bluetooth back on from a remote network PC.