diff options
Diffstat (limited to 'quantum/process_keycode/process_auto_shift.c')
-rw-r--r-- | quantum/process_keycode/process_auto_shift.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index cc3a974ea..02af5174f 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c | |||
@@ -67,7 +67,7 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record) | |||
67 | register_code(autoshift_lastkey); | 67 | register_code(autoshift_lastkey); |
68 | } else { | 68 | } else { |
69 | // Simulate pressing the shift key. | 69 | // Simulate pressing the shift key. |
70 | add_weak_mods(MOD_BIT(KC_LSFT)); | 70 | add_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
71 | register_code(autoshift_lastkey); | 71 | register_code(autoshift_lastkey); |
72 | } | 72 | } |
73 | return false; | 73 | return false; |
@@ -108,7 +108,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { | |||
108 | autoshift_flags.lastshifted = false; | 108 | autoshift_flags.lastshifted = false; |
109 | } else { | 109 | } else { |
110 | // Simulate pressing the shift key. | 110 | // Simulate pressing the shift key. |
111 | add_weak_mods(MOD_BIT(KC_LSFT)); | 111 | add_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
112 | register_code(autoshift_lastkey); | 112 | register_code(autoshift_lastkey); |
113 | autoshift_flags.lastshifted = true; | 113 | autoshift_flags.lastshifted = true; |
114 | # if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT) | 114 | # if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT) |
@@ -123,7 +123,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { | |||
123 | wait_ms(TAP_CODE_DELAY); | 123 | wait_ms(TAP_CODE_DELAY); |
124 | # endif | 124 | # endif |
125 | unregister_code(autoshift_lastkey); | 125 | unregister_code(autoshift_lastkey); |
126 | del_weak_mods(MOD_BIT(KC_LSFT)); | 126 | del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
127 | } else { | 127 | } else { |
128 | // Release after keyrepeat. | 128 | // Release after keyrepeat. |
129 | unregister_code(keycode); | 129 | unregister_code(keycode); |
@@ -131,7 +131,7 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { | |||
131 | // This will only fire when the key was the last auto-shiftable | 131 | // This will only fire when the key was the last auto-shiftable |
132 | // pressed. That prevents aaaaBBBB then releasing a from unshifting | 132 | // pressed. That prevents aaaaBBBB then releasing a from unshifting |
133 | // later Bs (if B wasn't auto-shiftable). | 133 | // later Bs (if B wasn't auto-shiftable). |
134 | del_weak_mods(MOD_BIT(KC_LSFT)); | 134 | del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
135 | } | 135 | } |
136 | } | 136 | } |
137 | send_keyboard_report(); // del_weak_mods doesn't send one. | 137 | send_keyboard_report(); // del_weak_mods doesn't send one. |
@@ -157,14 +157,14 @@ void autoshift_matrix_scan(void) { | |||
157 | 157 | ||
158 | void autoshift_toggle(void) { | 158 | void autoshift_toggle(void) { |
159 | autoshift_flags.enabled = !autoshift_flags.enabled; | 159 | autoshift_flags.enabled = !autoshift_flags.enabled; |
160 | del_weak_mods(MOD_BIT(KC_LSFT)); | 160 | del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
161 | } | 161 | } |
162 | 162 | ||
163 | void autoshift_enable(void) { autoshift_flags.enabled = true; } | 163 | void autoshift_enable(void) { autoshift_flags.enabled = true; } |
164 | 164 | ||
165 | void autoshift_disable(void) { | 165 | void autoshift_disable(void) { |
166 | autoshift_flags.enabled = false; | 166 | autoshift_flags.enabled = false; |
167 | del_weak_mods(MOD_BIT(KC_LSFT)); | 167 | del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
168 | } | 168 | } |
169 | 169 | ||
170 | # ifndef AUTO_SHIFT_NO_SETUP | 170 | # ifndef AUTO_SHIFT_NO_SETUP |
@@ -195,7 +195,7 @@ bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { | |||
195 | autoshift_end(KC_NO, now, false); | 195 | autoshift_end(KC_NO, now, false); |
196 | } | 196 | } |
197 | // For pressing another key while keyrepeating shifted autoshift. | 197 | // For pressing another key while keyrepeating shifted autoshift. |
198 | del_weak_mods(MOD_BIT(KC_LSFT)); | 198 | del_weak_mods(MOD_BIT(KC_LEFT_SHIFT)); |
199 | 199 | ||
200 | switch (keycode) { | 200 | switch (keycode) { |
201 | case KC_ASTG: | 201 | case KC_ASTG: |
@@ -244,7 +244,7 @@ __attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *r | |||
244 | # ifndef NO_AUTO_SHIFT_SPECIAL | 244 | # ifndef NO_AUTO_SHIFT_SPECIAL |
245 | case KC_TAB: | 245 | case KC_TAB: |
246 | case KC_MINUS ... KC_SLASH: | 246 | case KC_MINUS ... KC_SLASH: |
247 | case KC_NONUS_BSLASH: | 247 | case KC_NONUS_BACKSLASH: |
248 | # endif | 248 | # endif |
249 | return true; | 249 | return true; |
250 | } | 250 | } |