From 29a0c06b547d72b80d416a8b6fab478c77fbd247 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Mon, 3 Oct 2022 19:07:46 -0700 Subject: [PATCH] Don't clear mousekeys unless clearing keys --- quantum/action.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quantum/action.c b/quantum/action.c index 78322e4a83a..5ef070051f4 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -1053,6 +1053,10 @@ __attribute__((weak)) void unregister_weak_mods(uint8_t mods) { void clear_keyboard(void) { clear_mods(); clear_keyboard_but_mods(); +#ifdef MOUSEKEY_ENABLE + mousekey_clear(); + mousekey_send(); +#endif } /** \brief Utilities for actions. (FIXME: Needs better description) @@ -1075,10 +1079,6 @@ void clear_keyboard_but_mods_and_keys() { #endif clear_weak_mods(); send_keyboard_report(); -#ifdef MOUSEKEY_ENABLE - mousekey_clear(); - mousekey_send(); -#endif #ifdef PROGRAMMABLE_BUTTON_ENABLE programmable_button_clear(); programmable_button_send();