1
0
Fork 0

Add special keycodes for media control. Fix power down command.

This commit is contained in:
tmk 2011-07-01 01:10:55 +09:00
parent 6d45e05ede
commit 1bda8a8c69
2 changed files with 23 additions and 0 deletions

6
command.c Normal file → Executable file
View file

@ -122,14 +122,20 @@ uint8_t command_proc(void)
#endif
#ifdef USB_EXTRA_ENABLE
case KB_ESC:
host_clear_keyboard_report();
host_send_keyboard_report();
#ifdef HOST_PJRC
if (suspend && remote_wakeup) {
usb_remote_wakeup();
} else {
host_system_send(SYSTEM_POWER_DOWN);
host_system_send(0);
_delay_ms(500);
}
#else
host_system_send(SYSTEM_POWER_DOWN);
host_system_send(0);
_delay_ms(500);
#endif
break;
#endif