Like many others, I've been searching for a way to hard reset a wireless keyboard seemingly stuck paired to another computer. I tried the main solution offered here, holding down the power button to put keyboard in pairing or discoverable mode, but it did not work for me. However, a clue offered here:
http://support.apple.com/kb/HT1809#2
under Pairing your Apple Wireless Keyboard with another Mac - "First unpair the keyboard If the unpaired Mac is within 33 feet (10 meters) of the computer your keyboard is currently paired with" gave me an inspiration.
I grabbed the keyboard, went outside (without my phone in my pocket) and walked about 20 meters away from the building. Then I pushed and held the On/Off button, and it went into pairing mode. It was blinking! So I ran back in the building and right to the computer that I was trying to pair it with - it was immediately discovered, entered the digits, and it WORKED! It only took me half a day to figure that out ...
Long story short, to reset a wireless apple keyboard, the trick might be to get away from any bluetooth signals, and then hold the power button down until it goes into discoverable mode.