From 8a332e6f0105d2db9239e3c3f997bae754522804 Mon Sep 17 00:00:00 2001 From: Pete Sevander Date: Wed, 10 May 2023 18:59:52 +0300 Subject: 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 * 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 Co-authored-by: Stefan Kerkmann --- quantum/action_tapping.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'quantum/action_tapping.c') 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) { // state machine is in the "reset" state, no tapping key is to be // processed - if (IS_NOEVENT(tapping_key.event) && IS_EVENT(event)) { - if (event.pressed && is_tap_record(keyp)) { + if (IS_NOEVENT(tapping_key.event)) { + if (!IS_EVENT(event)) { + // early return for tick events + } else if (event.pressed && is_tap_record(keyp)) { // the currently pressed key is a tapping key, therefore transition // into the "pressed" tapping key state ac_dprintf("Tapping: Start(Press tap key).\n"); @@ -176,13 +178,13 @@ bool process_tapping(keyrecord_t *keyp) { process_record_tap_hint(&tapping_key); waiting_buffer_scan_tap(); debug_tapping_key(); - return true; } else { // the current key is just a regular key, pass it on for regular // processing process_record(keyp); - return true; } + + return true; } TAP_DEFINE_KEYCODE; -- cgit v1.2.3