Hi there, I have deduced that it is my apple white keyboard that is not allowing my iMac to go to sleep. If I unplug the USB connector it goes to sleep and stays asleep, if the keyboard is plugged in, then it wakes and will not automatically sleep. I have used TextEdit to see if there is an obvious key sticking but nothing comes up. (all the keys seems to work too). Is there a program that will show you visually the inputs of the keyboard so maybe I can find out what is going wrong here? Thanks for any help. Paul.