aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-04-28 02:24:11 +0900
committertmk <nobody@nowhere>2012-04-29 00:29:52 +0900
commite6f79b1e5aa083c892e2c077c15a762639c7848d (patch)
tree130d76ca6cc0af5fb5df41f7d909e04b4f4420d7
parent0a4fa89548e8c098c65c289865ebbf1e1c29adf4 (diff)
downloadqmk_firmware-e6f79b1e5aa083c892e2c077c15a762639c7848d.tar.gz
qmk_firmware-e6f79b1e5aa083c892e2c077c15a762639c7848d.zip
Workaround for Mac HID SET_IDLE behaviour.
-rw-r--r--pjrc/usb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pjrc/usb.c b/pjrc/usb.c
index 2b69b6a7f..89087218f 100644
--- a/pjrc/usb.c
+++ b/pjrc/usb.c
@@ -626,7 +626,7 @@ void usb_remote_wakeup(void)
626// 626//
627ISR(USB_GEN_vect) 627ISR(USB_GEN_vect)
628{ 628{
629 uint8_t intbits, t, i; 629 uint8_t intbits, t;
630 static uint8_t div4=0; 630 static uint8_t div4=0;
631 631
632 intbits = UDINT; 632 intbits = UDINT;
@@ -667,13 +667,16 @@ ISR(USB_GEN_vect)
667 usb_keyboard_idle_count++; 667 usb_keyboard_idle_count++;
668 if (usb_keyboard_idle_count == usb_keyboard_idle_config) { 668 if (usb_keyboard_idle_count == usb_keyboard_idle_config) {
669 usb_keyboard_idle_count = 0; 669 usb_keyboard_idle_count = 0;
670 /* TODO: fix keyboard_report inconsistency */
671/* To avoid Mac SET_IDLE behaviour.
670 UEDATX = keyboard_report_prev->mods; 672 UEDATX = keyboard_report_prev->mods;
671 UEDATX = 0; 673 UEDATX = 0;
672 uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6; 674 uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6;
673 for (i=0; i<keys; i++) { 675 for (uint8_t i=0; i<keys; i++) {
674 UEDATX = keyboard_report_prev->keys[i]; 676 UEDATX = keyboard_report_prev->keys[i];
675 } 677 }
676 UEINTX = 0x3A; 678 UEINTX = 0x3A;
679*/
677 } 680 }
678 } 681 }
679 } 682 }