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 diff --git a/keyboards/zsa/moonlander/matrix.c b/keyboards/zsa/moonlander/matrix.c index 26bb34ae65..4543c1946e 100644 --- a/keyboards/zsa/moonlander/matrix.c +++ b/keyboards/zsa/moonlander/matrix.c @@ -105,6 +105,9 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { mcp23018_errors = mcp23018_init_local(false); #ifdef RGB_MATRIX_ENABLE rgb_matrix_init(); + if (rgb_matrix_get_mode() == 1 && keyboard_config.rgb_matrix_enable) { + rgb_matrix_set_color_all(0, 0, 0); + } #endif } } diff --git a/keyboards/zsa/voyager/matrix.c b/keyboards/zsa/voyager/matrix.c index b05313a033..37e15db50f 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_is_enabled()) { + rgb_matrix_set_color_all(255, 255, 255); + } #endif } } diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index 3cfb0ed464..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)); } /** @@ -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(); @@ -430,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 @@ -462,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; }