Still looking for testers...
Here it works for
- Mac OSX (on a MacBook Pro)
- Windows 7 (on a MacBook Pro)
- Windows 8 (on a Wetab)
Any comments if it is working or not and what blink codes you get are welcome.
In the pull request #1488 I added also a feature to send your computer to sleep mode or shut it down. When you are interested, you can get the code from there.
You can use it in the following way:
Keyboard.systemControl(SYSTEM_CONTROL_POWER_DOWN);
or
Keyboard.systemControl(SYSTEM_CONTROL_SLEEP);
There are some more commands defined in USBAPI.h, but most of the do nothing on my Mac:
#define SYSTEM_CONTROL_POWER_DOWN 1
#define SYSTEM_CONTROL_SLEEP 2
#define SYSTEM_CONTROL_WAKEUP 3
#define SYSTEM_CONTROL_COLD_RESTART 4
#define SYSTEM_CONTROL_WARM_RESTART 5
#define SYSTEM_CONTROL_DOCK 6
#define SYSTEM_CONTROL_UNDOCK 7
#define SYSTEM_CONTROL_SPEAKER_MUTE 8
#define SYSTEM_CONTROL_HIBERNATE 9
#define SYSTEM_CONTROL_DISPLAY_INVERT 10
#define SYSTEM_CONTROL_DISPLAY_INTERNAL 11
#define SYSTEM_CONTROL_DISPLAY_EXTERNAL 12
#define SYSTEM_CONTROL_DISPLAY_BOTH 13
#define SYSTEM_CONTROL_DISPLAY_DUAL 14
#define SYSTEM_CONTROL_DISPLAY_TOGGLE_INT_EXT 15
#define SYSTEM_CONTROL_DISPLAY_SWAP 16
Michael