summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Hermida Ruiz <rhruiz@gmail.com>2023-04-10 09:45:25 -0300
committerGitHub <noreply@github.com>2023-04-10 13:45:25 +0100
commitd3b8179f467da23fec98e97b28684c43e9e8ba73 (patch)
tree8a053ec43b34759332a7dfc310711079e3dae0b4
parentf8d70116cc1633b32b4861ed0351275ab5081931 (diff)
Prevent Tri-Layer keys from stopping caps words (#20398)
-rw-r--r--quantum/process_keycode/process_caps_word.c1
-rw-r--r--tests/caps_word/test_caps_word.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_caps_word.c b/quantum/process_keycode/process_caps_word.c
index 8f2ee1db8b..d4382680bf 100644
--- a/quantum/process_keycode/process_caps_word.c
+++ b/quantum/process_keycode/process_caps_word.c
@@ -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):
diff --git a/tests/caps_word/test_caps_word.cpp b/tests/caps_word/test_caps_word.cpp
index 6d38b383f3..802f1e960e 100644
--- a/tests/caps_word/test_caps_word.cpp
+++ b/tests/caps_word/test_caps_word.cpp
@@ -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},