On OS X, I can charge my iPhone without any problems, but Windows always complains about not having enough power, regardless of what USB device I connect to the keyboard. Why is that? How can I force Windows to power my iPhone anyway?
As @AthomSfere pointed out in his comment, this is more a matter of Apple doing something weird (not properly reporting device capabilities) rather than Windows doing something wrong.
Regardless, this is fixable by hacking the Windows registry and forcing a higher amperage to be reported for the USB hub in the Apple keyboard.
Not-so-complete actions to take:
You have to find the "Generic USB Hub" that represents the keyboard's hub in the Device Manager, determine it's Location Information (Details tab of properties), then search for it in the registry. You want to find it somewhere in the
Once you determine which device key represents that hub, take ownership of its key, then give permission to yourself or Everyone to change it.
Then add a
Unplug the keyboard and plug it back in and wait for it to be re-detected (or reboot).
Once it's done, if all worked right you should be able to go back to it's properties in the Device Manager and under its Power tab it should now report "This hub is self-powered" with a Total Power of 500mAh and Windows should stop complaining about the lack of power when you plug in a device.
YouTube video tutorial covering how to do this step-by-step: Apple Keyboard Hack - Fully-powered USB ports on a PC!