summaryrefslogtreecommitdiffstats
path: root/quantum/process_keycode
diff options
context:
space:
mode:
authorChris Salch <emeraldd.chris@gmail.com>2023-07-07 06:52:24 -0500
committerGitHub <noreply@github.com>2023-07-07 21:52:24 +1000
commite9ff66d8ad341917ff270c9f33b83d86fe0fb6c4 (patch)
tree1e701d35af1faf6cdeee33893bafd4c6f2efffef /quantum/process_keycode
parente43080788ea707e53a96e5300d4766749302b364 (diff)
Adds a way to separate tab from AUTO_SHIFT_SPECIAL. (#20996)
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_auto_shift.c10
-rw-r--r--quantum/process_keycode/process_auto_shift.h8
2 files changed, 15 insertions, 3 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index 62c347ae0c..63e893fc18 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -75,7 +75,15 @@ __attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *r
case AUTO_SHIFT_NUMERIC:
# endif
# ifndef NO_AUTO_SHIFT_SPECIAL
- case AUTO_SHIFT_SPECIAL:
+# ifndef NO_AUTO_SHIFT_TAB
+ case KC_TAB:
+# endif
+# ifndef NO_AUTO_SHIFT_SYMBOLS
+ case AUTO_SHIFT_SYMBOLS:
+# endif
+# endif
+# ifdef AUTO_SHIFT_ENTER
+ case KC_ENT:
# endif
return true;
}
diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h
index 66a4b3138a..780177d2ff 100644
--- a/quantum/process_keycode/process_auto_shift.h
+++ b/quantum/process_keycode/process_auto_shift.h
@@ -28,10 +28,14 @@
// clang-format off
#define AUTO_SHIFT_ALPHA KC_A ... KC_Z
#define AUTO_SHIFT_NUMERIC KC_1 ... KC_0
+#define AUTO_SHIFT_SYMBOLS \
+ KC_MINUS ... KC_SLASH: \
+ case KC_NONUS_BACKSLASH
+
+// Kept to avoid breaking existing keymaps.
#define AUTO_SHIFT_SPECIAL \
KC_TAB: \
- case KC_MINUS ... KC_SLASH: \
- case KC_NONUS_BACKSLASH
+ case AUTO_SHIFT_SYMBOLS
// clang-format on
bool process_auto_shift(uint16_t keycode, keyrecord_t *record);