]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Add special keycodes for media control. Fix power down command.
authortmk <nobody@nowhere>
Thu, 30 Jun 2011 16:10:55 +0000 (01:10 +0900)
committertmk <nobody@nowhere>
Thu, 30 Jun 2011 16:10:55 +0000 (01:10 +0900)
command.c [changed mode: 0644->0755]
usb_keycodes.h

old mode 100644 (file)
new mode 100755 (executable)
index ca149db..2d065ed
--- a/command.c
+++ b/command.c
@@ -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
index bdec953910d769486effe59a07960cb842108de7..e39a847bf443ff994b05447bbf70407757e2e24b 100644 (file)
 #define KB_WH_R KB_MS_WH_RIGHT
 /* Sytem Control & Consumer usage */
 #define KB_PWR  KB_SYSTEM_POWER
+#define KB_SLEP KB_SYSTEM_SLEEP
+#define KB_WAKE KB_SYSTEM_WAKE
 #define KB_MUTE KB_AUDIO_MUTE
 #define KB_VOLU KB_AUDIO_VOL_UP
 #define KB_VOLD KB_AUDIO_VOL_DOWN
+#define KB_MNXT KB_MEDIA_NEXT_TRACK
+#define KB_MPRV KB_MEDIA_PREV_TRACK
+#define KB_MSTP KB_MEDIA_STOP
+#define KB_MPLY KB_MEDIA_PLAY_PAUSE
+#define KB_MSEL KB_MEDIA_SELECT
+#define KB_MAIL KB_MAIL
+#define KB_CALC KB_CALCULATOR
+#define KB_MYCM KB_MY_COMPUTER
+#define KB_WSCH KB_WWW_SEARCH
+#define KB_WHOM KB_WWW_HOME
+#define KB_WBAK KB_WWW_BACK
+#define KB_WFWD KB_WWW_FORWARD
+#define KB_WSTP KB_WWW_STOP
+#define KB_WREF KB_WWW_REFRESH
+#define KB_WFAV KB_WWW_FAVORITES
 
 
 /* Special keycode */