diff --git a/keyboards/zsa/ergodox_ez/ergodox_ez.c b/keyboards/zsa/ergodox_ez/ergodox_ez.c index 52f7eeed45..772c9fb4dc 100644 --- a/keyboards/zsa/ergodox_ez/ergodox_ez.c +++ b/keyboards/zsa/ergodox_ez/ergodox_ez.c @@ -304,8 +304,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void eeconfig_init_kb(void) { // EEPROM is getting reset! keyboard_config.raw = 0; keyboard_config.led_level = 4; - keyboard_config.navigator_cpi = 3; - eeconfig_update_kb(keyboard_config.raw); eeconfig_init_user(); } diff --git a/keyboards/zsa/ergodox_ez/ergodox_ez.h b/keyboards/zsa/ergodox_ez/ergodox_ez.h index cf29bdf646..22e63d6dbe 100644 --- a/keyboards/zsa/ergodox_ez/ergodox_ez.h +++ b/keyboards/zsa/ergodox_ez/ergodox_ez.h @@ -68,7 +68,6 @@ typedef union { struct { uint8_t led_level : 3; bool disable_layer_led : 1; - uint8_t navigator_cpi : 3; bool placeholder : 1; }; } keyboard_config_t; diff --git a/keyboards/zsa/moonlander/moonlander.c b/keyboards/zsa/moonlander/moonlander.c index 58a3339115..48e0fb42bd 100644 --- a/keyboards/zsa/moonlander/moonlander.c +++ b/keyboards/zsa/moonlander/moonlander.c @@ -470,7 +470,6 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! keyboard_config.rgb_matrix_enable = true; keyboard_config.led_level = true; keyboard_config.led_level_res = 0b11; - keyboard_config.navigator_cpi = 3; eeconfig_update_kb(keyboard_config.raw); eeconfig_init_user(); } diff --git a/keyboards/zsa/moonlander/moonlander.h b/keyboards/zsa/moonlander/moonlander.h index 21455fb035..2cabe482e3 100644 --- a/keyboards/zsa/moonlander/moonlander.h +++ b/keyboards/zsa/moonlander/moonlander.h @@ -43,8 +43,6 @@ typedef union { bool rgb_matrix_enable :1; bool led_level :1; uint8_t led_level_res :2; // DO NOT REMOVE - uint8_t navigator_cpi :3; - }; } keyboard_config_t; diff --git a/keyboards/zsa/voyager/voyager.c b/keyboards/zsa/voyager/voyager.c index 098d5ec570..1bf26a30f4 100644 --- a/keyboards/zsa/voyager/voyager.c +++ b/keyboards/zsa/voyager/voyager.c @@ -301,7 +301,6 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! keyboard_config.raw = 0; keyboard_config.led_level = true; keyboard_config.led_level_res = 0b11; - keyboard_config.navigator_cpi = 3; eeconfig_update_kb(keyboard_config.raw); eeconfig_init_user(); } diff --git a/quantum/pointing_device/pointing_device_auto_mouse.c b/quantum/pointing_device/pointing_device_auto_mouse.c index 250351f608..0f53f5ca69 100644 --- a/quantum/pointing_device/pointing_device_auto_mouse.c +++ b/quantum/pointing_device/pointing_device_auto_mouse.c @@ -23,6 +23,9 @@ # include "debug.h" # include "action_util.h" # include "quantum_keycodes.h" +#ifdef LAYER_LOCK_ENABLE +# include "layer_lock.h" +#endif /* local data structure for tracking auto mouse */ static auto_mouse_context_t auto_mouse_context = { @@ -265,6 +268,9 @@ void pointing_device_task_auto_mouse(report_mouse_t mouse_report) { layer_on((AUTO_MOUSE_TARGET_LAYER)); } } else if (layer_state_is((AUTO_MOUSE_TARGET_LAYER)) && timer_elapsed(auto_mouse_context.timer.active) > auto_mouse_context.config.timeout) { +#ifdef LAYER_LOCK_ENABLE + if(is_layer_locked(AUTO_MOUSE_DEFAULT_LAYER)) return; +#endif layer_off((AUTO_MOUSE_TARGET_LAYER)); auto_mouse_context.timer.active = 0; auto_mouse_context.total_mouse_movement = (total_mouse_movement_t){.x = 0, .y = 0, .h = 0, .v = 0}; @@ -299,6 +305,9 @@ void auto_mouse_keyevent(bool pressed) { */ void auto_mouse_reset_trigger(bool pressed) { if (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)); }; @@ -334,9 +343,10 @@ bool process_auto_mouse(uint16_t keycode, keyrecord_t* record) { if (!(AUTO_MOUSE_ENABLED)) return true; switch (keycode) { - // Skip Mod keys to avoid layer reset + // Skip Mod keys and layer lock to avoid layer reset case KC_LEFT_CTRL ... KC_RIGHT_GUI: case QK_MODS ... QK_MODS_MAX: + case QK_LLCK: break; // TO((AUTO_MOUSE_TARGET_LAYER))------------------------------------------------------------------------------- case QK_TO ... QK_TO_MAX: