From 95407c7ad5806158a4ad7b640d5952e1c179c1ee Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Tue, 17 Jan 2023 06:23:57 +0100 Subject: [PATCH] Process Tap Dances before WPM/Velocikey (#19599) --- quantum/quantum.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index e7dc71e5d7f6..0fe54c60a7df 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -238,6 +238,14 @@ bool process_record_quantum(keyrecord_t *record) { } #endif +#ifdef TAP_DANCE_ENABLE + if (preprocess_tap_dance(keycode, record)) { + // The tap dance might have updated the layer state, therefore the + // result of the keycode lookup might change. + keycode = get_record_keycode(record, true); + } +#endif + #ifdef VELOCIKEY_ENABLE if (velocikey_enabled() && record->event.pressed) { velocikey_accelerate(); @@ -250,14 +258,6 @@ bool process_record_quantum(keyrecord_t *record) { } #endif -#ifdef TAP_DANCE_ENABLE - if (preprocess_tap_dance(keycode, record)) { - // The tap dance might have updated the layer state, therefore the - // result of the keycode lookup might change. - keycode = get_record_keycode(record, true); - } -#endif - if (!( #if defined(KEY_LOCK_ENABLE) // Must run first to be able to mask key_up events.