summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorSteven Liu <steve@stevenliu.com>2018-09-04 01:18:37 +0200
committerJack Humbert <jack.humb@gmail.com>2018-09-04 01:27:11 +0200
commitfa1ee47cf2293d06693b86e8dd188d9fbc9338c4 (patch)
treee89df085e8af0de370770cf8de18f1798ca1b8c5 /tmk_core
parent04bea9ef742827f2784401bd976b53fc29158d3d (diff)
downloadqmk_firmware-fa1ee47cf2293d06693b86e8dd188d9fbc9338c4.tar.gz
qmk_firmware-fa1ee47cf2293d06693b86e8dd188d9fbc9338c4.tar.xz
Enable mouse keys in register_code and unregister_code
This allows for macros to be assigned to press two mouse directions at same time, which allows for one key diagonals.
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index f7c039f45..76c150b40 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -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)