]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/action.c
document how to define LEFT_LEDS and how that hack is done
[qmk_firmware.git] / tmk_core / common / action.c
index f73b0fe807a7f2fec83c09e900948b064de697cc..41de01485342a856edc11414249adc2942e36031 100644 (file)
@@ -67,9 +67,11 @@ void action_exec(keyevent_t event)
 
 #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
     if (has_oneshot_layer_timed_out()) {
-        dprintf("Oneshot layer: timeout\n");
         clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
     }
+    if (has_oneshot_mods_timed_out()) {
+        clear_oneshot_mods();
+    }
 #endif
 
 #ifndef NO_ACTION_TAPPING
@@ -324,9 +326,10 @@ void process_action(keyrecord_t *record, action_t action)
                         tp_buttons |= (1<<2);
                         break;
                     default:
-                        mousekey_on(action.key.code);
-                        mousekey_send();
+                        break;
                 }
+                mousekey_on(action.key.code);
+                mousekey_send();
             } else {
                 switch (action.key.code) {
                     case KC_MS_BTN1:
@@ -339,9 +342,10 @@ void process_action(keyrecord_t *record, action_t action)
                         tp_buttons &= ~(1<<2);
                         break;
                     default:
-                        mousekey_off(action.key.code);
-                        mousekey_send();
+                        break;
                 }
+                mousekey_off(action.key.code);
+                mousekey_send();
             }
             break;
 #endif
@@ -615,6 +619,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_CAPSLOCK);
         send_keyboard_report();
+        wait_ms(100);        
         del_key(KC_CAPSLOCK);
         send_keyboard_report();
     }
@@ -625,6 +630,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_NUMLOCK);
         send_keyboard_report();
+        wait_ms(100);        
         del_key(KC_NUMLOCK);
         send_keyboard_report();
     }
@@ -635,6 +641,7 @@ void register_code(uint8_t code)
 #endif
         add_key(KC_SCROLLLOCK);
         send_keyboard_report();
+        wait_ms(100);        
         del_key(KC_SCROLLLOCK);
         send_keyboard_report();
     }