fix(q5_max): ensure fallback combo overrides layer locks
Change the fallback combo's action from TO(BASE) to LCK_BASE. Since LCK_BASE explicitly clears the locked_layers bitmask, it ensures that the keyboard actually returns to the BASE layer even if a layer was previously locked. The previous TO(BASE) action only updated the temporary layer state, which was immediately overwritten by the persistent locked_layers bitmask in layer_state_set_user().
This commit is contained in:
@@ -228,12 +228,12 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
// Combos -----------------------------------------------------------------
|
// Combos -----------------------------------------------------------------
|
||||||
// COMM + DOT + SLSH → TO(BASE): emergency fallback to base layer.
|
// COMM + DOT + SLSH → LCK_BASE: emergency fallback to base layer.
|
||||||
// COMBO_ONLY_FROM_LAYER 0 (config.h) ensures these keycodes are always
|
// COMBO_ONLY_FROM_LAYER 0 (config.h) ensures these keycodes are always
|
||||||
// resolved from BASE so the combo fires regardless of the active layer.
|
// resolved from BASE so the combo fires regardless of the active layer.
|
||||||
const uint16_t PROGMEM fallback_combo[] = {KC_COMM, KC_DOT, KC_SLSH, COMBO_END};
|
const uint16_t PROGMEM fallback_combo[] = {KC_COMM, KC_DOT, KC_SLSH, COMBO_END};
|
||||||
combo_t key_combos[] = {
|
combo_t key_combos[] = {
|
||||||
COMBO(fallback_combo, TO(BASE)),
|
COMBO(fallback_combo, LCK_BASE),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Re-assert locked layers whenever QMK modifies layer state (e.g. TT release).
|
// Re-assert locked layers whenever QMK modifies layer state (e.g. TT release).
|
||||||
|
|||||||
Reference in New Issue
Block a user