Merge branch 'firmware25' into feat/trackball_default_cpi

This commit is contained in:
Florian Didron
2025-09-02 16:38:14 +07:00
6 changed files with 11 additions and 8 deletions

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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();
}

View File

@@ -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: