Skip to content

Commit

Permalink
Prevent Tri-Layer keys from stopping caps words (qmk#20398)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhruiz authored Apr 10, 2023
1 parent f8d7011 commit d3b8179
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions quantum/process_keycode/process_caps_word.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ bool process_caps_word(uint16_t keycode, keyrecord_t* record) {
case QK_TOGGLE_LAYER ... QK_TOGGLE_LAYER_MAX:
case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX:
case QK_ONE_SHOT_LAYER ... QK_ONE_SHOT_LAYER_MAX:
case QK_TRI_LAYER_LOWER ... QK_TRI_LAYER_UPPER:
// Ignore AltGr.
case KC_RALT:
case OSM(MOD_RALT):
Expand Down
5 changes: 5 additions & 0 deletions tests/caps_word/test_caps_word.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ INSTANTIATE_TEST_CASE_P(
"OSL", OSL(1), 1, KC_NO, true},
CapsWordPressUserParams{
"LT_held", LT_1_KC_A, TAPPING_TERM + 1, KC_NO, true},
// Tri-Layer keys are ignored and continue Caps Word.
CapsWordPressUserParams{
"TL_LOWR", TL_LOWR, 1, KC_NO, true},
CapsWordPressUserParams{
"TL_UPPR", TL_UPPR, 1, KC_NO, true},
// AltGr keys are ignored and continue Caps Word.
CapsWordPressUserParams{
"KC_RALT", KC_RALT, 1, KC_NO, true},
Expand Down

0 comments on commit d3b8179

Please sign in to comment.