]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Workaround for Mac HID SET_IDLE behaviour.
authortmk <nobody@nowhere>
Fri, 27 Apr 2012 17:24:11 +0000 (02:24 +0900)
committertmk <nobody@nowhere>
Fri, 27 Apr 2012 17:24:11 +0000 (02:24 +0900)
pjrc/usb.c

index 2b69b6a7fac7930eaa0f5f10c60af7f0c96efe65..89087218f3c719e7c296dd799811805a4c14a127 100644 (file)
@@ -626,7 +626,7 @@ void usb_remote_wakeup(void)
 //
 ISR(USB_GEN_vect)
 {
-       uint8_t intbits, t, i;
+       uint8_t intbits, t;
        static uint8_t div4=0;
 
         intbits = UDINT;
@@ -667,13 +667,16 @@ ISR(USB_GEN_vect)
                                usb_keyboard_idle_count++;
                                if (usb_keyboard_idle_count == usb_keyboard_idle_config) {
                                        usb_keyboard_idle_count = 0;
+                                        /* TODO: fix keyboard_report inconsistency */
+/* To avoid Mac SET_IDLE behaviour.
                                        UEDATX = keyboard_report_prev->mods;
                                        UEDATX = 0;
                                         uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6;
-                                       for (i=0; i<keys; i++) {
+                                       for (uint8_t i=0; i<keys; i++) {
                                                UEDATX = keyboard_report_prev->keys[i];
                                        }
                                        UEINTX = 0x3A;
+*/
                                }
                        }
                }