Mac keyboard on powered hub does not work initially I have a strange problem with my powered USB hub (USB 2.0) and my wired Apple keyboard which is plugged into that hub.

When I turn on the MacBook Pro (Early 2013), running OS X 10.9, the external keyboard is not working sometimes. As soon as I unplug the keyboard and plug it in again it works. This only happens when the MacBook has just turned on.

If I turn the powered hub to an unpowered hub (just by unplugging the power chord) the keyboard works fine - even at startup.

Does anyone have a clue what may be the problem?
You should try using the keyboard extension cable that comes with your keyboard. For somewhat obscure reasons, this solved the problem for me and other people trying to use the Apple Wired Keyboard with USB hubs. See also https://apple.stackexchange.com/a/179299/33925