]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
fix mousekey call
authorJack Humbert <jack.humb@gmail.com>
Mon, 3 Sep 2018 23:48:09 +0000 (19:48 -0400)
committerDrashna Jaelre <drashna@live.com>
Mon, 3 Sep 2018 23:59:32 +0000 (16:59 -0700)
tmk_core/common/action.c

index 76c150b40420ee8cf0de2fbeeb8cc8dc11954105..ae086474963699369b48476077f0478c7c73063b 100644 (file)
@@ -773,9 +773,12 @@ void register_code(uint8_t code)
     else if IS_CONSUMER(code) {
         host_consumer_send(KEYCODE2CONSUMER(code));
     }
-    else if IS_MOUSEKEY(code) {
-      mousekey_on(code);
-    }
+
+    #ifdef MOUSEKEY_ENABLE
+      else if IS_MOUSEKEY(code) {
+        mousekey_on(code);
+      }
+    #endif
 }
 
 /** \brief Utilities for actions. (FIXME: Needs better description)
@@ -835,9 +838,11 @@ void unregister_code(uint8_t code)
     else if IS_CONSUMER(code) {
         host_consumer_send(0);
     }
-    else if IS_MOUSEKEY(code) {
-      mousekey_off(code);
-    }
+    #ifdef MOUSEKEY_ENABLE
+      else if IS_MOUSEKEY(code) {
+        mousekey_off(code);
+      }
+    #endif
 }
 
 /** \brief Utilities for actions. (FIXME: Needs better description)