From b683c88bf886f17ff6dba01023b4ce116dc18c88 Mon Sep 17 00:00:00 2001 From: urob <978080+urob@users.noreply.github.com> Date: Thu, 28 Jul 2022 11:04:00 -0400 Subject: [PATCH] Use QUICK_TAP_MS macros --- config/base.keymap | 12 +++++++----- config/combos.dtsi | 3 ++- zmk-nodefree-config/helper.h | 11 +++++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index 33fc590..214974f 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -44,6 +44,8 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" #define FN 4 #define UC 5 +#define QUICK_TAP_MS 220 + #include "combos.dtsi" // source after layer shortcuts #include "mouse.dtsi" @@ -63,7 +65,7 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" < { flavor = "balanced"; tapping-term-ms = <200>; - quick-tap-ms = <220>; // double-tap + hold repeats tap-key + quick-tap-ms = ; // double-tap + hold repeats tap-key // global-quick-tap; }; @@ -77,8 +79,8 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" ZMK_BEHAVIOR(hml, hold_tap, // left-hand HRMs flavor = "balanced"; - tapping-term-ms = <280>; - quick-tap-ms = <220>; + tapping-term-ms = <200>; + quick-tap-ms = ; global-quick-tap-ms = <150>; bindings = <&kp>, <&kp>; hold-trigger-key-positions = ; // include left-hand HRMs for chording @@ -86,8 +88,8 @@ ZMK_BEHAVIOR(hml, hold_tap, // left-hand HRMs ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs flavor = "balanced"; - tapping-term-ms = <280>; - quick-tap-ms = <220>; + tapping-term-ms = <200>; + quick-tap-ms = ; global-quick-tap-ms = <150>; bindings = <&kp>, <&kp>; hold-trigger-key-positions = ; // include right-hand HRMs for chording diff --git a/config/combos.dtsi b/config/combos.dtsi index 71b22ad..da90037 100644 --- a/config/combos.dtsi +++ b/config/combos.dtsi @@ -7,8 +7,9 @@ ╰───────╮ LH2 LH1 LH0 │ │ RH0 RH1 RH2 ╭───────╯ ╰─────────────╯ ╰─────────────╯ */ -// must be same for all combos to avoid #986, possibly related to #905 +// COMBO_TERM must be same for all combos to avoid #986, possibly related to #905 #define COMBO_TERM 30 +#define COMBO_QUICK_TAP_MS 150 /* Punctuation (horizontal left hand) */ ZMK_COMBO(num, &tog NUM, LT3 LT1, DEF NUM) diff --git a/zmk-nodefree-config/helper.h b/zmk-nodefree-config/helper.h index c0a5660..27f8269 100644 --- a/zmk-nodefree-config/helper.h +++ b/zmk-nodefree-config/helper.h @@ -1,4 +1,4 @@ -/* +/* * helper.h * * Convenience macros simplifying ZMK's keymap configuration. @@ -48,13 +48,16 @@ #if !defined COMBO_TERM #define COMBO_TERM 30 #endif +#if !defined COMBO_QUICK_TAP_MS + #define COMBO_QUICK_TAP_MS -1 +#endif #define ZMK_COMBO(name, combo_bindings, keypos, combo_layers) \ / { \ combos { \ compatible = "zmk,combos"; \ combo_ ## name { \ - global-quick-tap-ms = <125>; \ + global-quick-tap-ms = ; \ timeout-ms = ; \ bindings = ; \ key-positions = ; \ @@ -81,7 +84,7 @@ #if !defined OS_UNICODE_LEAD #if HOST_OS == 2 #define OS_UNICODE_LEAD ¯o_press &kp LALT // macOS - #elif HOST_OS == 1 + #elif HOST_OS == 1 #define OS_UNICODE_LEAD ¯o_tap &kp LS(LC(U)) // Linux #else #define OS_UNICODE_LEAD ¯o_tap &kp RALT &kp U // Windows + WinCompose (default) @@ -90,7 +93,7 @@ #if !defined OS_UNICODE_TRAIL #if HOST_OS == 2 #define OS_UNICODE_TRAIL ¯o_release &kp LALT // macOS - #elif HOST_OS == 1 + #elif HOST_OS == 1 #define OS_UNICODE_TRAIL ¯o_tap &kp SPACE // Linux #else #define OS_UNICODE_TRAIL ¯o_tap &kp RET // Windows + WinCompose (default)