]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
fixed mousekey delay to do double/triple click easily.
authortmk <nobody@nowhere>
Mon, 24 Jan 2011 16:01:13 +0000 (01:01 +0900)
committertmk <nobody@nowhere>
Mon, 24 Jan 2011 16:01:13 +0000 (01:01 +0900)
mousekey.c

index f2f0de50644ef8fb7fa3ae16426efd68fbbd0c0e..38a8c2e4740674f047a47e7dafa1fbd72441ca4c 100644 (file)
@@ -61,7 +61,8 @@ void mousekey_usb_send(void)
 
         usb_mouse_print(mousekey_x, mousekey_y, mousekey_v, mousekey_h, mousekey_btn);
 
-        _delay_ms(MOUSEKEY_DELAY_TIME >> (mousekey_repeat < 5 ? mousekey_repeat : 4));
+        if (mousekey_x || mousekey_y || mousekey_v || mousekey_h)
+            _delay_ms(MOUSEKEY_DELAY_TIME >> (mousekey_repeat < 5 ? mousekey_repeat : 4));
         mousekey_repeat++;
     } else {
         mousekey_repeat = 0;