From 1f59fe6d1b1da209fa4475f10d082455ee1381eb Mon Sep 17 00:00:00 2001 From: Ga68 Date: Fri, 28 Jan 2022 23:03:21 -0800 Subject: [PATCH] Adjust tap_code16 to account for TAP_HOLD_CAPS_DELAY (#15635) Co-authored-by: Ga68 --- quantum/quantum.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 21f499165a8..833f53175f0 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -93,9 +93,12 @@ __attribute__((weak)) void unregister_code16(uint16_t code) { __attribute__((weak)) void tap_code16(uint16_t code) { register_code16(code); -#if TAP_CODE_DELAY > 0 - wait_ms(TAP_CODE_DELAY); -#endif + if (code == KC_CAPS_LOCK) { + wait_ms(TAP_HOLD_CAPS_DELAY); + } + else if (TAP_CODE_DELAY > 0) { + wait_ms(TAP_CODE_DELAY); + } unregister_code16(code); }