If you are having problems with getting an Apple Wireless Bluetooth keyboard, mouse or trackpad from connecting to your Mac (iMac, Macbook or Mac Pro), you can try this trick. The following mentions the keyboard, but it should work for other wireless devices that have a on/off switch of the contact type (i.e. press on and off, rather than a physical slide switch).
By Alvin Alexander. Last updated: July 20, 2015