]> git.donarmstrong.com Git - qmk_firmware.git/blobdiff - tmk_core/common/action.c
Helix-serial.c configuration improvement (#4370)
[qmk_firmware.git] / tmk_core / common / action.c
index f7c039f45798936d5eaf434a05ce004bbf57b530..8bdcd54e32cfbfa69ea74dce61f6e74188ae451a 100644 (file)
@@ -120,7 +120,7 @@ void process_hand_swap(keyevent_t *event) {
 }
 #endif
 
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
 bool disable_action_cache = false;
 
 void process_record_nocache(keyrecord_t *record)
@@ -773,6 +773,13 @@ void register_code(uint8_t code)
     else if IS_CONSUMER(code) {
         host_consumer_send(KEYCODE2CONSUMER(code));
     }
+
+    #ifdef MOUSEKEY_ENABLE
+      else if IS_MOUSEKEY(code) {
+        mousekey_on(code);
+        mousekey_send();
+      }
+    #endif
 }
 
 /** \brief Utilities for actions. (FIXME: Needs better description)
@@ -832,6 +839,12 @@ void unregister_code(uint8_t code)
     else if IS_CONSUMER(code) {
         host_consumer_send(0);
     }
+    #ifdef MOUSEKEY_ENABLE
+      else if IS_MOUSEKEY(code) {
+        mousekey_off(code);
+        mousekey_send();
+      }
+    #endif
 }
 
 /** \brief Utilities for actions. (FIXME: Needs better description)