I did the SMC and PRAM reset once, but it didn't work. I'll try doing 2 or 3 times, but I took my keyboard to work and used it in the office's iMac and it worked without a hitch. So it's like 123pleasehelpme's issue:
The computer works fine with a different keyboard.
The keyboard works fine with a different computer.
The problem only happens when the keyboard and computer are together.
Since I couldn't fix the problem, I borrowed a USB keyboard from a friend and used it for about two weeks Then, last Monday, I erased the keyboard from the bluetooth panel, reset the SMC twice followed by a PRAM reset, and paired the wifi keyboard again. It worked and, so far, the problem has not come back.
This happened to my keyboard as well.
It seems to be an issue with the (fn) key getting stuck in some way.
If CMD+TAB isn't working, try pressing (fn+CMD+TAB) & you should get full functionality back.
This will also see the SPACE & Caps Lock working again.
The issue still happens intermittently but the (fn) key will set things right.