summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorGa68 <Ga68@users.noreply.github.com>2022-01-28 23:03:21 -0800
committerGitHub <noreply@github.com>2022-01-28 23:03:21 -0800
commit1f59fe6d1b1da209fa4475f10d082455ee1381eb (patch)
tree71de03b135b505a318c1803f0ca96a2b9aee6a97 /quantum
parent3e9551bcfa9183a5f5a7f9b6ecd1ed4f4135c7e2 (diff)
Adjust tap_code16 to account for TAP_HOLD_CAPS_DELAY (#15635)
Co-authored-by: Ga68 <github.ga68.e@grxme.com>
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 21f499165a..833f53175f 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);
}