From c498d5025c9b2fbf1fd77692429a7d0d3041fcfd Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 13 Apr 2026 21:40:20 -0400 Subject: [PATCH] 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(). --- keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c index 11c9e79f74..9da254b35c 100644 --- a/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c +++ b/keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c @@ -228,12 +228,12 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { // clang-format on // 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 // 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}; 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). -- 2.52.0