summaryrefslogtreecommitdiff
path: root/quantum/action_tapping.c
diff options
context:
space:
mode:
authorPete Sevander <pete.sevander@gmail.com>2023-05-10 18:59:52 +0300
committerGitHub <noreply@github.com>2023-05-10 17:59:52 +0200
commit8a332e6f0105d2db9239e3c3f997bae754522804 (patch)
treefb8d79bf1d0bbfde46384227992d7bfd70942b96 /quantum/action_tapping.c
parent6f2a1e4e17fcba9183c6f4f126383d99d9d714f8 (diff)
Fix Mod-Tap combo regression (#20669)
* Add keyevent for combo keyrecord * Fix formatting * Update quantum/process_keycode/process_combo.c Co-authored-by: Sergey Vlasov <sigprof@gmail.com> * Add combo unit-tests and hot-fix process_record_tap_hint ...as this function tries to lookup the combo keys passed in. This will be refactored in a later pr. --------- Co-authored-by: Sergey Vlasov <sigprof@gmail.com> Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'quantum/action_tapping.c')
-rw-r--r--quantum/action_tapping.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c
index 362b15105c..f94e5e6f69 100644
--- a/quantum/action_tapping.c
+++ b/quantum/action_tapping.c
@@ -167,8 +167,10 @@ bool process_tapping(keyrecord_t *keyp) {
167 167
168 // state machine is in the "reset" state, no tapping key is to be 168 // state machine is in the "reset" state, no tapping key is to be
169 // processed 169 // processed
170 if (IS_NOEVENT(tapping_key.event) && IS_EVENT(event)) { 170 if (IS_NOEVENT(tapping_key.event)) {
171 if (event.pressed && is_tap_record(keyp)) { 171 if (!IS_EVENT(event)) {
172 // early return for tick events
173 } else if (event.pressed && is_tap_record(keyp)) {
172 // the currently pressed key is a tapping key, therefore transition 174 // the currently pressed key is a tapping key, therefore transition
173 // into the "pressed" tapping key state 175 // into the "pressed" tapping key state
174 ac_dprintf("Tapping: Start(Press tap key).\n"); 176 ac_dprintf("Tapping: Start(Press tap key).\n");
@@ -176,13 +178,13 @@ bool process_tapping(keyrecord_t *keyp) {
176 process_record_tap_hint(&tapping_key); 178 process_record_tap_hint(&tapping_key);
177 waiting_buffer_scan_tap(); 179 waiting_buffer_scan_tap();
178 debug_tapping_key(); 180 debug_tapping_key();
179 return true;
180 } else { 181 } else {
181 // the current key is just a regular key, pass it on for regular 182 // the current key is just a regular key, pass it on for regular
182 // processing 183 // processing
183 process_record(keyp); 184 process_record(keyp);
184 return true;
185 } 185 }
186
187 return true;
186 } 188 }
187 189
188 TAP_DEFINE_KEYCODE; 190 TAP_DEFINE_KEYCODE;