Skip to content

Commit

Permalink
Incorporated the Mac HID SET_IDLE behaviour fix. Minor typos.
Browse files Browse the repository at this point in the history
Included the Mac fix from TMK main branch.
  • Loading branch information
skagon committed May 6, 2012
1 parent 75214d3 commit 9dc4a9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions m0110_usb/matrix.c
Expand Up @@ -124,9 +124,9 @@ uint8_t matrix_scan(void)
// We know that the received key is either keypad, arrow or calc; moreover, we assume that any
// simultaneous events will deal with shift plus arrow key simultaneous releases. It is not possible
// to distinguish a simultaneous shift plus arrow key press from a 'virtual' shift plus arrow key
// press event, generated by by the 'calc' keys.
// press event, generated by the 'calc' keys.

// If the received key release is a 'calc' key and not already register as pressed, but the arrow key
// If the received key release is a 'calc' key and not already registered as pressed, but the arrow key
// with the same scancode is registered as pressed, then we understand that we've got a simultaneous
// shift-arrow release; then readjust the received key code to 'arrow' (0x40) instead of 'calc' (0x60)
// (i.e. subtract 0x20)
Expand Down
10 changes: 7 additions & 3 deletions pjrc/usb.c
Expand Up @@ -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;
Expand Down Expand Up @@ -667,13 +667,17 @@ 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_prev->mods;
UEDATX = 0;
uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6;
for (i=0; i<keys; i++) {
uint8_t keys = usb_keyboard_protocol ? KBD_REPORT_KEYS : 6;
for (uint8_t i=0; i<keys; i++) {
UEDATX = keyboard_report_prev->keys[i];
}
UEINTX = 0x3A;
*/
}
}
}
Expand Down

0 comments on commit 9dc4a9e

Please sign in to comment.