I have an iMac, and because I program I prefer to use the extended USB keyboard.
Just as the batteries to my wireless mouse died, my USB keyboard inexplicably stopped working. I've been using this keyboard for months through previous mouse battery failures without incident.
Here's what I've observed:
The USB keyboard works fine when connected to my MacBook Pro. (The keyboard works.)
My iPhone charges when connected to the USB ports of the iMac. (The USB ports work.)
The USB keyboard works fine when connect to the USB port of my secondary Thunderbolt display, but only one of the three ports. (?)
When the USB keyboard is connected directly to the iMac,
sudo dmesgproduces two lines like this:
AppleUSBHubPort[...]::FatalError - Port 2 of Hub at ... reported error ... while doing setting port power
Where's what didn't work:
Rebooting in safe mode:
sudo nvram boot-args="-x"
Deleting the Bluetooth wireless keyboard device and rebooting
Rebooting while holding Command-Option-P-R
I have an iMac running OS X 10.8.2 with a secondary Thunderbolt display.