My USB Apple Keyboard stopped working after upgrading to Sierra I have an iMac (late 2015), which I use with a wired USB Apple keyboard. The keyboard was working perfectly until I upgraded to Sierra, at which point it stopped working.


An SMC reset fixes the problem, until I shut down the machine, or unplug and replug the keyboard. At which point, I have to reset the SMC again.
A PRAM reset doesn't fix the problem.
The keyboard doesn't work in recovery mode or safe mode, either.
The keyboard doesn't appear in System Information, in the USB section.
Installing macOS on an external disk doesn't help.
Reinstalling macOS on the internal disk didn't help.
Other keyboards (Microsoft USB keyboard, Apple "Magic" keyboard) work perfectly.
The same keyboard works when plugged into a Windows laptop.
Deleting /Library/Caches and ~/Library/Caches doesn't help.
Replacing the logic board didn't help.


I know this is a problem with macOS since the keyboard was working perfectly with El Capitan, and the problem started immediately after the "upgrade".

What are some other troubleshooting steps I can take?
Based on the Apple forums, people have had this similar problem since Yosemite up to Sierra. While there has been no official reason by Apple and many comments have went unanswered on Apple's website.  

Here is what people have reported to have work. (whether it makes sense or not, this is in fact what people have confirmed to be working. (same situation identically for some, other keyboards work but not the USB Apple Keyboard.

These are 2 things that have been confirmed to work on iMac 2015 models.


  1) Plugging the keyboard into a USB hub, then the hub into the iMac.
  
  2) Plugging the keyboard into any USB extension cable, then the cable
  into the iMac.


Referrence: https://discussions.apple.com/thread/7501433?tstart=0