From b0a7e48a392af36c09f91ec70a1bde9a1a5db9f0 Mon Sep 17 00:00:00 2001 From: Olivier Gamache Date: Wed, 26 Jun 2024 19:18:14 -0400 Subject: [PATCH] try chording --- config/boards/shields/ponyta/ponyta.keymap | 46 ++++++++++++++++++---- config/ponyta.conf | 6 ++- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/config/boards/shields/ponyta/ponyta.keymap b/config/boards/shields/ponyta/ponyta.keymap index 3420b03..dd895c4 100644 --- a/config/boards/shields/ponyta/ponyta.keymap +++ b/config/boards/shields/ponyta/ponyta.keymap @@ -22,6 +22,7 @@ #define SYM 2 #define FRA 3 #define NAV 4 +#define CHORD 5 #define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left-hand keys #define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right-hand keys @@ -42,6 +43,7 @@ #define SMART_NUM &smart_num NUM 0 #define SPACE_NAV &space_nav NAV SPACE +#define ESC_CHORD &esc_chord CHORD ESC / { macros { @@ -89,6 +91,22 @@ , <¯o_release &kp LGUI &kp LSHFT &kp N5> ; }; + m_the: m_the { + compatible = "zmk,behavior-macro"; + wait-ms = <10>; + tap-ms = <0>; + #binding-cells = <0>; + bindings + = <&kp T &kp H &kp E &kp SPACE>; + }; + }; + combos { + compatible = "zmk,combos"; + combo_m_the { + timeout-ms = <200>; + key-positions = ; + bindings = <&m_the>; + layers = ; }; behaviors { as: auto_shift { @@ -173,16 +191,17 @@ quick-tap-ms = ; bindings = <&mo>, <&kp>; }; - esc_tab: esc_tab { - compatible = "zmk,behavior-tap-dance"; - #binding-cells = <0>; - tapping-term-ms = <200>; - bindings = <&kp ESC>, <&kp TAB>; + esc_chord: esc_chord { + compatible = "zmk,behavior-hold-tap"; + flavor = "balanced"; + #binding-cells = <2>; + tapping-term-ms = <300>; + quick-tap-ms = ; + bindings = <&mo>, <&kp>; }; }; keymap { compatible = "zmk,keymap"; - default { bindings = < // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ @@ -192,7 +211,7 @@ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &com_semi &dot_col &q_scream // ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯ - SMART_NUM &kp RET &esc_tab SPACE_NAV &sl SYM &bs_del + SMART_NUM &kp RET &esc_tab SPACE_NAV &sl SYM ESC_CHORD // ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ >; }; @@ -245,6 +264,19 @@ &none &none &none &none &none &none &none &none &none &none // ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯ &record &kp RET &screenshot &none &none &none + // ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ + >; + }; + chord { + bindings = < + // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ + &none &none &none &none &none &none &none &none &none &none + // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &none &none &none &none &none &none &none &none &none &none + // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ + &none &none &none &none &none &none &none &none &none &none + // ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯ + &none &none &none &none &none &none // ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯ >; }; diff --git a/config/ponyta.conf b/config/ponyta.conf index feae044..f3db7e9 100644 --- a/config/ponyta.conf +++ b/config/ponyta.conf @@ -8,5 +8,9 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=7 +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=512 +CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=10 + # Uncomment the following line to enable USB Logging (this increases power usage by a significant amount, turn it off when not in use) -CONFIG_ZMK_USB_LOGGING=y +# CONFIG_ZMK_USB_LOGGING=y