summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2018-09-04 01:48:09 +0200
committerDrashna Jaelre <drashna@live.com>2018-09-04 01:59:32 +0200
commita14eb01883cd135105cebd4d5570337250cc76cb (patch)
tree0260a88a8187fa0a09e8cf75949248481e299664 /tmk_core
parent714c82cc2ee493b1b2d234c9900ff6d04cc39f62 (diff)
downloadqmk_firmware-a14eb01883cd135105cebd4d5570337250cc76cb.tar.gz
qmk_firmware-a14eb01883cd135105cebd4d5570337250cc76cb.tar.xz
fix mousekey call
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 76c150b40..ae0864749 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -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)