fix(q5_max): switch fallback combo to LCK_BASE for reliable layer recovery #21

Merged
rootiest merged 1 commits from fix/combo-key into main 2026-04-14 02:09:57 +00:00
Owner

Summary

Update the emergency fallback combo to use LCK_BASE instead of TO(BASE) to ensure base layer persistence and prevent accidental layer drifts.

  • Switch the COMM + DOT + SLSH combo result from TO(BASE) to LCK_BASE.
  • Ensure the fallback combo correctly resets the layer state to the BASE layer while maintaining the project's layer locking conventions.

Changes by file

keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c

  • Update fallback_combo result in key_combos[] from TO(BASE) to LCK_BASE.
  • Update corresponding comment to reflect the switch to LCK_BASE.

Notes

  • COMBO_ONLY_FROM_LAYER 0 (configured in config.h) ensures these keycodes are always resolved from the BASE layer, allowing the combo to fire regardless of the currently active layer.
  • This change aligns the fallback combo with the layer control system implemented in previous PRs (e.g., PR #3).

Test plan

  • Compile succeeds with no errors.
  • Pressing COMM, DOT, and SLSH simultaneously from any layer successfully returns the keyboard to the BASE layer.
  • Verify that LCK_BASE correctly handles any active layer locks or persistent states as intended for the Q5 Max.
## Summary Update the emergency fallback combo to use `LCK_BASE` instead of `TO(BASE)` to ensure base layer persistence and prevent accidental layer drifts. - Switch the `COMM` + `DOT` + `SLSH` combo result from `TO(BASE)` to `LCK_BASE`. - Ensure the fallback combo correctly resets the layer state to the BASE layer while maintaining the project's layer locking conventions. ## Changes by file ### `keyboards/keychron/q5_max/ansi_encoder/keymaps/via/keymap.c` - Update `fallback_combo` result in `key_combos[]` from `TO(BASE)` to `LCK_BASE`. - Update corresponding comment to reflect the switch to `LCK_BASE`. ## Notes - `COMBO_ONLY_FROM_LAYER 0` (configured in `config.h`) ensures these keycodes are always resolved from the BASE layer, allowing the combo to fire regardless of the currently active layer. - This change aligns the fallback combo with the layer control system implemented in previous PRs (e.g., PR #3). ## Test plan - [x] Compile succeeds with no errors. - [x] Pressing `COMM`, `DOT`, and `SLSH` simultaneously from any layer successfully returns the keyboard to the BASE layer. - [x] Verify that `LCK_BASE` correctly handles any active layer locks or persistent states as intended for the Q5 Max.
rootiest added 1 commit 2026-04-14 02:07:33 +00:00
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().
rootiest changed title from Fix combo key issue to fix(q5_max): switch fallback combo to LCK_BASE for reliable layer recovery 2026-04-14 02:09:31 +00:00
rootiest merged commit 66c73eef89 into main 2026-04-14 02:09:57 +00:00
rootiest deleted branch fix/combo-key 2026-04-14 02:09:57 +00:00
Sign in to join this conversation.