diff options
| author | Chris Salch <emeraldd.chris@gmail.com> | 2023-07-07 06:52:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-07 21:52:24 +1000 |
| commit | e9ff66d8ad341917ff270c9f33b83d86fe0fb6c4 (patch) | |
| tree | 1e701d35af1faf6cdeee33893bafd4c6f2efffef /quantum/process_keycode | |
| parent | e43080788ea707e53a96e5300d4766749302b364 (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.c | 10 | ||||
| -rw-r--r-- | quantum/process_keycode/process_auto_shift.h | 8 |
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 | |||
| 75 | case AUTO_SHIFT_NUMERIC: | 75 | case AUTO_SHIFT_NUMERIC: |
| 76 | # endif | 76 | # endif |
| 77 | # ifndef NO_AUTO_SHIFT_SPECIAL | 77 | # ifndef NO_AUTO_SHIFT_SPECIAL |
| 78 | case AUTO_SHIFT_SPECIAL: | 78 | # ifndef NO_AUTO_SHIFT_TAB |
| 79 | case KC_TAB: | ||
| 80 | # endif | ||
| 81 | # ifndef NO_AUTO_SHIFT_SYMBOLS | ||
| 82 | case AUTO_SHIFT_SYMBOLS: | ||
| 83 | # endif | ||
| 84 | # endif | ||
| 85 | # ifdef AUTO_SHIFT_ENTER | ||
| 86 | case KC_ENT: | ||
| 79 | # endif | 87 | # endif |
| 80 | return true; | 88 | return true; |
| 81 | } | 89 | } |
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 @@ | |||
| 28 | // clang-format off | 28 | // clang-format off |
| 29 | #define AUTO_SHIFT_ALPHA KC_A ... KC_Z | 29 | #define AUTO_SHIFT_ALPHA KC_A ... KC_Z |
| 30 | #define AUTO_SHIFT_NUMERIC KC_1 ... KC_0 | 30 | #define AUTO_SHIFT_NUMERIC KC_1 ... KC_0 |
| 31 | #define AUTO_SHIFT_SYMBOLS \ | ||
| 32 | KC_MINUS ... KC_SLASH: \ | ||
| 33 | case KC_NONUS_BACKSLASH | ||
| 34 | |||
| 35 | // Kept to avoid breaking existing keymaps. | ||
| 31 | #define AUTO_SHIFT_SPECIAL \ | 36 | #define AUTO_SHIFT_SPECIAL \ |
| 32 | KC_TAB: \ | 37 | KC_TAB: \ |
| 33 | case KC_MINUS ... KC_SLASH: \ | 38 | case AUTO_SHIFT_SYMBOLS |
| 34 | case KC_NONUS_BACKSLASH | ||
| 35 | // clang-format on | 39 | // clang-format on |
| 36 | 40 | ||
| 37 | bool process_auto_shift(uint16_t keycode, keyrecord_t *record); | 41 | bool process_auto_shift(uint16_t keycode, keyrecord_t *record); |
