]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Enable mouse keys in register_code and unregister_code
authorSteven Liu <steve@stevenliu.com>
Mon, 3 Sep 2018 23:18:37 +0000 (00:18 +0100)
committerJack Humbert <jack.humb@gmail.com>
Mon, 3 Sep 2018 23:27:11 +0000 (19:27 -0400)
This allows for macros to be assigned to press two mouse directions at same time, which allows for one key diagonals.

tmk_core/common/action.c

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