Problems with mac mini recognizing aluminum keyboard
I have a Mac Mini 1.4ghz dual core and I have problems with it recognizing the apple aluminum keyboard. The keyboard works fine with my macbook. The keyboard actually works fine if I do a restart but if I shut it down and then open it, the keyboard was not recognized. I spent hours with Apple support trying various combinations of connecting and reconnecting to the usb ports. I did my own research and found that I could get the keyboard to work if I connected it through an external 4 slot usb hub, although it showed that it was connected through aa a usb 2 hub rather than the usb 3 hub which is standard on the mac mini. Shutting down and starting up with the external 4 slot usb hub (it does not have its own power source) always works. All of my other devices work flawlessly with all the usb ports on the mac mini. I finally (although I doubt that this is final) was able to get the keyboard recognized on the mac mini by plugging the keyboard into my macbook and then plugging my iPhone into one of the usb ports on the side of my keyboard. I unplugged the iPhone from the keyboard and I then plugged the keyboard directly into the mac mini and it was recognized and worked fine. I did a restart and the keyboard worked fine but I am a little reluctant to shut it down for fear that on start up it will be lost again. The only thing I can think of is that I had the iphone plugged into the keyboard before this all happened and unplugged it without removing the iphone from the desk top and that screwed things up. It is the only conclusion I can come to. I would appreciate any thought or ideas people might have. As I said I spent two days and may hours with apple support and they could not help me other than to tell me to take everything to the genius bar which I am reluctant to do.
Mac mini (Late 2014), mac minin 1.4 ghz Yosemite 10.10.3