]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - pjrc/usb_keyboard.c
FIX: send last report when idle timeouts. (pjrc)
[max/tmk_keyboard.git] / pjrc / usb_keyboard.c
index e29c5c9e918955eea672886f079ce0930883f7a8..8aae2d3818159810151ef8fd8663a9c7cafd5fc2 100644 (file)
@@ -15,6 +15,7 @@ uint8_t usb_keyboard_protocol=1;
 
 // the idle configuration, how often we send the report to the
 // host (ms * 4) even when it hasn't changed
+// Windows and Linux set 0 while OS X sets 6(24ms) by SET_IDLE request.
 uint8_t usb_keyboard_idle_config=125;
 
 // count until idle timeout
@@ -81,8 +82,12 @@ static inline int8_t send_report(report_keyboard_t *report, uint8_t endpoint, ui
             UENUM = endpoint;
     }
     UEDATX = report->mods;
+#ifdef USB_NKRO_ENABLE
     if (!keyboard_nkro)
         UEDATX = 0;
+#else
+    UEDATX = 0;
+#endif
     for (uint8_t i = keys_start; i < keys_end; i++) {
             UEDATX = report->keys[i];
     }