diff options
author | tmk <nobody@nowhere> | 2011-03-10 00:50:27 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2011-03-10 11:17:54 +0900 |
commit | cec254950509038ca9c805e87feea9091d77d29f (patch) | |
tree | c4f542b18dc080e32508aced1ee0ccce5cbf3a53 /pjrc/usb.c | |
parent | 1a7c3585ed9a68099e371b3180a404dd5d08ce1a (diff) | |
download | qmk_firmware-cec254950509038ca9c805e87feea9091d77d29f.tar.gz |
FIX: send last report when idle timeouts. (pjrc)
Diffstat (limited to 'pjrc/usb.c')
-rw-r--r-- | pjrc/usb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pjrc/usb.c b/pjrc/usb.c index 9fd30dee3..3cfe94731 100644 --- a/pjrc/usb.c +++ b/pjrc/usb.c @@ -687,10 +687,11 @@ ISR(USB_GEN_vect) usb_keyboard_idle_count++; if (usb_keyboard_idle_count == usb_keyboard_idle_config) { usb_keyboard_idle_count = 0; - UEDATX = keyboard_report->mods; + UEDATX = keyboard_report_prev->mods; UEDATX = 0; - for (i=0; i<6; i++) { - UEDATX = keyboard_report->keys[i]; + uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6; + for (i=0; i<keys; i++) { + UEDATX = keyboard_report_prev->keys[i]; } UEINTX = 0x3A; } |