From b11fa4d63307ebcb58c2aad187830ef031156e9b Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Thu, 16 Oct 2025 15:56:55 +0700 Subject: [PATCH 1/6] fix(moonlander): audio startup song --- keyboards/zsa/moonlander/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/zsa/moonlander/config.h b/keyboards/zsa/moonlander/config.h index 5f67ab0759..603d6a2b43 100644 --- a/keyboards/zsa/moonlander/config.h +++ b/keyboards/zsa/moonlander/config.h @@ -37,3 +37,4 @@ #define AUDIO_PIN A5 #define AUDIO_PIN_ALT A4 #define AUDIO_PIN_ALT_AS_NEGATIVE +#define AUDIO_INIT_DELAY 100 From aac45148656197a04f9b7e52eb4e18d12083986a Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Thu, 16 Oct 2025 20:34:40 +0700 Subject: [PATCH 2/6] fix(automouse): prevent non mouse key to leave the automouse layer --- quantum/pointing_device/pointing_device_auto_mouse.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index 3cfb0ed464..c1f4c9f668 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.c +++ b/quantum/pointing_device/pointing_device_auto_mouse.c @@ -320,9 +320,6 @@ void auto_mouse_reset_trigger(bool pressed) { #ifdef LAYER_LOCK_ENABLE if(is_layer_locked(AUTO_MOUSE_DEFAULT_LAYER)) return; #endif - if (layer_state_is((AUTO_MOUSE_TARGET_LAYER))) { - layer_off((AUTO_MOUSE_TARGET_LAYER)); - }; auto_mouse_reset(); } auto_mouse_context.timer.delay = timer_read(); From 846852964826cf6d0fa37b2a26593c67dd7e4ac1 Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Thu, 16 Oct 2025 21:12:27 +0700 Subject: [PATCH 3/6] fix(right-side-recover): force solid color to properly reset when recovering the right side --- keyboards/zsa/moonlander/matrix.c | 4 ++++ keyboards/zsa/voyager/matrix.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c index 26bb34ae65..f963170041 100644 --- a/keyboards/zsa/moonlander/matrix.c +++ b/keyboards/zsa/moonlander/matrix.c @@ -105,6 +105,10 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { mcp23018_errors = mcp23018_init_local(false); #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); + // Required to recover the solid color mode + if (rgb_matrix_get_mode() == 1) { + rgb_matrix_set_color_all(255, 255, 255); + } #endif } } diff --git a/keyboards/zsa/voyager/matrix.c b/keyboards/zsa/voyager/matrix.c index b05313a033..c08c9e07bc 100644 --- a/keyboards/zsa/voyager/matrix.c +++ b/keyboards/zsa/voyager/matrix.c @@ -92,6 +92,10 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { mcp23018_errors = mcp23018_init_local(false); #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); + // Required to recover the solid color mode + if (rgb_matrix_get_mode() == 1) { + rgb_matrix_set_color_all(255, 255, 255); + } #endif } } From 1a66743799361bb3ce28747309f71b96a82d34a9 Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Mon, 20 Oct 2025 16:58:19 +0700 Subject: [PATCH 4/6] fix(rgbmatrix): restore solid colors when recovering the right side --- keyboards/zsa/moonlander/matrix.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c index f963170041..4543c1946e 100644 --- a/keyboards/zsa/moonlander/matrix.c +++ b/keyboards/zsa/moonlander/matrix.c @@ -105,9 +105,8 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { mcp23018_errors = mcp23018_init_local(false); #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); - // Required to recover the solid color mode - if (rgb_matrix_get_mode() == 1) { - rgb_matrix_set_color_all(255, 255, 255); + if (rgb_matrix_get_mode() == 1 && keyboard_config.rgb_matrix_enable) { + rgb_matrix_set_color_all(0, 0, 0); } #endif } From bca47935dcbc66c4e0f849343982da039fa106ac Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Mon, 20 Oct 2025 17:03:16 +0700 Subject: [PATCH 5/6] fix(rgbmatrix): restore solid colors when recovering the right side --- keyboards/zsa/voyager/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/zsa/voyager/matrix.c b/keyboards/zsa/voyager/matrix.c index c08c9e07bc..37e15db50f 100644 --- a/keyboards/zsa/voyager/matrix.c +++ b/keyboards/zsa/voyager/matrix.c @@ -93,7 +93,7 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); // Required to recover the solid color mode - if (rgb_matrix_get_mode() == 1) { + if (rgb_matrix_get_mode() == 1 && rgb_matrix_is_enabled()) { rgb_matrix_set_color_all(255, 255, 255); } #endif From d0d9424e7e39a51265db8430da6c4d1821617b75 Mon Sep 17 00:00:00 2001 From: Florian Didron Date: Mon, 20 Oct 2025 19:29:43 +0700 Subject: [PATCH 6/6] fix(automouse): prevents automouse layer to be activated by mouse keys set on other layers --- quantum/pointing_device/pointing_device_auto_mouse.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index c1f4c9f668..7c4ad53d3d 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.c +++ b/quantum/pointing_device/pointing_device_auto_mouse.c @@ -250,7 +250,7 @@ __attribute__((weak)) bool auto_mouse_activation(report_mouse_t mouse_report) { auto_mouse_context.total_mouse_movement.y += mouse_report.y; auto_mouse_context.total_mouse_movement.h += mouse_report.h; auto_mouse_context.total_mouse_movement.v += mouse_report.v; - return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_SCROLL_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_SCROLL_THRESHOLD || mouse_report.buttons; + return abs(auto_mouse_context.total_mouse_movement.x) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.y) > AUTO_MOUSE_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.h) > AUTO_MOUSE_SCROLL_THRESHOLD || abs(auto_mouse_context.total_mouse_movement.v) > AUTO_MOUSE_SCROLL_THRESHOLD || (mouse_report.buttons && layer_state_is(AUTO_MOUSE_TARGET_LAYER)); } /** @@ -427,7 +427,7 @@ bool process_auto_mouse(uint16_t keycode, keyrecord_t* record) { // skip on no event if (IS_NOEVENT(record->event)) break; // check if keyrecord is mousekey - if (is_mouse_record(keycode, record)) { + if (is_mouse_record(keycode, record) && is_auto_mouse_active()) { auto_mouse_keyevent(record->event.pressed); } else if (!is_auto_mouse_active()) { // all non-mousekey presses restart delay timer and reset status @@ -459,13 +459,7 @@ bool process_auto_mouse(uint16_t keycode, keyrecord_t* record) { */ static bool is_mouse_record(uint16_t keycode, keyrecord_t* record) { // allow for keyboard to hook in and override if need be - if (is_mouse_record_kb(keycode, record)) return true; - - // if it's a mouse key, only treat it as a mouse record if we're currently on the auto mouse target layer - // this prevents mouse keys from activating the auto mouse layer when pressed on other layers - if (IS_MOUSEKEY(keycode)) { - return layer_state_is((AUTO_MOUSE_TARGET_LAYER)); - } + if ((is_mouse_record_kb(keycode, record) || IS_MOUSEKEY(keycode))) return true; return false; }