Sleep/Wake Up from Remote Control

I want to wake up PC using the remote control.

I'm using this library.

This is the code for Sleep

System.write(SYSTEM_SLEEP);

This is the code for Wake Up

System.write(SYSTEM_WAKE_UP);

How can I write the code in order to send the pc to sleep or wake it up using the same button on my remote control?

Thank you! :slight_smile:

Does the example code for the library work?

If so, what is your remote control?

Paul