diff --git a/common_features.mk b/common_features.mk
index 6365955a7f..7c956cbf2f 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -79,6 +79,12 @@ ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/fauxclicky.c
endif
+ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
+ OPT_DEFS += -DMOUSEKEY_ENABLE
+ OPT_DEFS += -DMOUSE_ENABLE
+ SRC += $(QUANTUM_DIR)/mousekey.c
+endif
+
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
diff --git a/tmk_core/common/mousekey.c b/quantum/mousekey.c
similarity index 100%
rename from tmk_core/common/mousekey.c
rename to quantum/mousekey.c
diff --git a/tmk_core/common/mousekey.h b/quantum/mousekey.h
similarity index 99%
rename from tmk_core/common/mousekey.h
rename to quantum/mousekey.h
index 52b8fe10e1..70dc4bb5c5 100644
--- a/tmk_core/common/mousekey.h
+++ b/quantum/mousekey.h
@@ -17,7 +17,7 @@ along with this program. If not, see .
#pragma once
-#include
+#include
#include "host.h"
#ifndef MK_3_SPEED
diff --git a/tmk_core/common.mk b/tmk_core/common.mk
index 05839824c0..0e189962be 100644
--- a/tmk_core/common.mk
+++ b/tmk_core/common.mk
@@ -68,10 +68,6 @@ ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes)
endif
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
- TMK_COMMON_SRC += $(COMMON_DIR)/mousekey.c
- TMK_COMMON_DEFS += -DMOUSEKEY_ENABLE
- TMK_COMMON_DEFS += -DMOUSE_ENABLE
-
ifeq ($(strip $(MOUSE_SHARED_EP)), yes)
TMK_COMMON_DEFS += -DMOUSE_SHARED_EP
SHARED_EP_ENABLE = yes