zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.83k stars 2.86k forks source link

Cannot get &lt keys to repeat the tap keycode when tapped and held #2592

Closed dimitrioschr closed 1 month ago

dimitrioschr commented 1 month ago

I am on nice!nano v2. My keymap uses some &lt behaviours that are related to SPACE, BACKSPACE and DEL and I would like these keys to repeat when the &lt key is held. I have tried a variety of re-arrangements and additions to my keymap but the required output cannot be achieved, I need to press the keys repeatedly to delete multiple characters or add many spaces. Any ideas? Here is my keymap:

`/*

include

include <dt-bindings/zmk/keys.h>

include <dt-bindings/zmk/bt.h>

define _QWERTY 0

define _NAVI 1

define _NUMBER 2

define _FUNCTION 3

define _SYMBOL 4

define _BLUE 5

define dQ &ht EXCL Q

define dW &ht AT W

define dE &ht HASH E

define dR &ht DOLLAR R

define dT &ht PERCENT T

define dA &ht LGUI A

define dS &ht LALT S

define dD &ht LCTRL D

define dF &ht LSHIFT F

define dG &ht PLUS G

define dZ &kp Z

define dX &ht LBRC X

define dC &ht LBKT C

define dV &ht LPAR V

define dB &ht ASTERISK B

define dTILD &ht GRAVE TILDE

define dY &ht CARET Y

define dU &ht AMPS U

define dI &ht ASTERISK I

define dO &ht UNDERSCORE O

define dP &ht EQUAL P

define dH &ht MINUS H

define dJ &ht LSHIFT J

define dK &ht LCTRL K

define dL &ht LALT L

define dCOLN &ht SEMICOLON COLON

define dN &ht SLASH N

define dM &ht RPAR M

define dCOMM &ht RBKT COMMA

define dDOT &ht RBRC DOT

define dSLSH &ht QUESTION SLASH

define dDQT &ht SQT DQT

define dBSLS &ht PIPE BACKSLASH

define dOSL &sl _SYMBOL

define dBSPC &lt _NUMBER BSPC

define dDEL &lt _FUNCTION DEL

define dSPC &lt _NAVI SPACE

/ REMEMBER TO DEFINE THE &ht HOLD TAP BEHAVIOUR/

/ {

    mt {
            tapping-term-ms = <200>;
            quick-tap-ms = <200>;
            // default quick tap ms is 120
            require-prior-idle-ms = <100>;
    };
    lt {
            tapping-term-ms = <200>;
            quick-tap-ms = <200>;
            // default quick tap ms is 120
            require-prior-idle-ms = <100>;
    };

    behaviors {
        ht: hold_tap {
            compatible = "zmk,behavior-hold-tap";
            #binding-cells = <2>;
            flavor = "tap-preferred";
            tapping-term-ms = <200>;
            quick-tap-ms = <200>;
            // default quick tap ms is 120
            require-prior-idle-ms = <100>;
            bindings = <&kp>, <&kp>;
        };
    };

    macros {
            cut: cut {
                    compatible = "zmk,behavior-macro";
                    #binding-cells = <0>;
                    bindings
                        = <&macro_press &kp LCTRL>
                        , <&macro_tap &kp X>
                        , <&macro_release &kp LCTRL>
                        ;
            };
            copy: copy {
                    compatible = "zmk,behavior-macro";
                    #binding-cells = <0>;
                    bindings
                        = <&macro_press &kp LCTRL>
                        , <&macro_tap &kp C>
                        , <&macro_release &kp LCTRL>
                        ;
            };
            paste: paste {
                    compatible = "zmk,behavior-macro";
                    #binding-cells = <0>;
                    bindings
                        = <&macro_press &kp LCTRL>
                        , <&macro_tap &kp V>
                        , <&macro_release &kp LCTRL>
                        ;
            };
            undo: undo {
                    compatible = "zmk,behavior-macro";
                    #binding-cells = <0>;
                    bindings
                        = <&macro_press &kp LCTRL>
                        , <&macro_tap &kp Z>
                        , <&macro_release &kp LCTRL>
                        ;
            };
            redo: redo {
                    compatible = "zmk,behavior-macro";
                    #binding-cells = <0>;
                    bindings
                        = <&macro_press &kp LCTRL>
                        , <&macro_tap &kp Y>
                        , <&macro_release &kp LCTRL>
                        ;
            };
    };

    keymap {
            compatible = "zmk,keymap";

            default_layer {

/* .----------------------------------------------------------------------------------------------------------------------.

`

petejohanson commented 1 month ago

You'll want to reference the behavior and update it, e.g.:

&lt {
    quick-tap-ms = <200>;
};

/ {
   the keymap goes here.
};