leonardo as keyboard does not wake windows 7 from sleep

Hi I dont was hoping this might be the answer to my problems ...still am.

However when I replaced the 3 files you'd attached I started getting compile errors...not with those new scripts but with CDC.cpp

Arduino: 1.0.6 (Mac OS X), Board: "Arduino Leonardo"
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:117: error: prototype for 'void Serial_::begin(long unsigned int)' does not match any in class 'Serial_'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/USBAPI.h:34: error: candidate is: void Serial_::begin(uint16_t)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:122: error: prototype for 'void Serial_::begin(long unsigned int, byte)' does not match any in class 'Serial_'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/USBAPI.h:34: error: candidate is: void Serial_::begin(uint16_t)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp: In member function 'virtual int Serial_::available()':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:133: error: 'peek_buffer' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp: In member function 'virtual int Serial_::peek()':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:141: error: 'peek_buffer' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:143: error: 'peek_buffer' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp: In member function 'virtual int Serial_::read()':
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:148: error: 'peek_buffer' was not declared in this scope
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp: At global scope:
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:166: error: prototype for 'size_t Serial_::write(const uint8_t*, size_t)' does not match any in class 'Serial_'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:49: error: candidates are: size_t Print::write(const char*)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:53: error:                 virtual size_t Print::write(const uint8_t*, size_t)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:54: error:                 size_t Print::write(const char*, size_t)
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/CDC.cpp:161: error:                 virtual size_t Serial_::write(uint8_t)

Im not sure if its something to do with the way I copied the files across...something I should have done with them differently. Something to do with the fact I was running a newer version of arduino (10.0.6) (on mac osx 10.8.3)

Or something else...

If you have any thoughts I'd be delighted to hear them.