iMac not recognising any keyboard
I had a similar problem. Brand new iMac that refused to detect my wired keyboard.

After a lot of experimenting, I resolved the problem by removing my bluetooth keyboard from the bluetooth devices list completely and then plugging in the wired keyboard.


Open System Preferences and select 'Bluetooth'
A list of the devices detected (both paired and unpaired) will appear.
Hover your mouse to the right of any connected bluetooth keyboard and press the 'x' that appears, to remove it from the list completely.
Finally connect your wired keyboard and hopefully 'voila'. For me, everything return to normal.


Good luck, hope that helps.

Sherie