Double-tap numword for sticky fun-layer

This commit is contained in:
urob 2022-11-09 19:03:23 -05:00
parent 51012ecf38
commit aaa8dbc436

View file

@ -26,7 +26,7 @@
#include "mouse.dtsi" #include "mouse.dtsi"
#include "xtr_defaults.h" #include "xtr_defaults.h"
ZMK_CONDITIONAL_LAYER(SYS NUM, FN) // SYS + NUM --> FN // ZMK_CONDITIONAL_LAYER(SYS NUM, FN) // SYS + NUM --> FN
/* Navigation keys and misc shortcuts */ /* Navigation keys and misc shortcuts */
@ -106,12 +106,16 @@ ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs
/* Custom behaviors */ /* Custom behaviors */
// tap: num-word | hold: num-layer // tap: num-word | double-tap: sticky fun-layer | hold: num-layer
ZMK_BEHAVIOR(num_fun_dance, tap_dance,
tapping-term-ms = <200>;
bindings = <&num_word>, <&sl FN>;
)
ZMK_BEHAVIOR(num_layer_word, hold_tap, ZMK_BEHAVIOR(num_layer_word, hold_tap,
flavor = "balanced"; flavor = "balanced";
tapping-term-ms = <200>; tapping-term-ms = <200>;
quick-tap-ms = <QUICK_TAP_MS>; quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&num_word>; bindings = <&mo>, <&num_fun_dance>;
) )
#define NUM_WORD &num_layer_word NUM 0 #define NUM_WORD &num_layer_word NUM 0
@ -150,6 +154,7 @@ ZMK_BEHAVIOR(lt_spc, hold_tap,
bindings = <&mo>, <&spc_morph>; bindings = <&mo>, <&spc_morph>;
) )
// tap: copy | double-tap: cut
ZMK_BEHAVIOR(copy_cut, tap_dance, ZMK_BEHAVIOR(copy_cut, tap_dance,
tapping-term-ms = <200>; tapping-term-ms = <200>;
bindings = <&kp LC(INS)>, <&kp LC(X)>; bindings = <&kp LC(INS)>, <&kp LC(X)>;
@ -253,7 +258,7 @@ ZMK_LAYER(num_layer,
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&hml LGUI N0 &hml LALT N4 &hml LCTRL N5 &hml LSHFT N6 ___ XTR_MM ___ ___ ___ ___ ___ &hml LGUI N0 &hml LALT N4 &hml LCTRL N5 &hml LSHFT N6 ___ XTR_MM ___ ___ ___ ___ ___
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
___ &kp N1 &kp N2 &kp N3 ___ XTR_MB ___ ___ ___ ___ ___ &kp N0 &kp N1 &kp N2 &kp N3 ___ XTR_MB ___ ___ ___ ___ ___
// ├─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┴─────────────┼─────────────┤ // ├─────────────┼─────────────┴─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┴─────────────┼─────────────┤
XTR_LH ___ ___ XTR_MH ___ ___ XTR_RH XTR_LH ___ ___ XTR_MH ___ ___ XTR_RH
// ╰─────────────╯ ╰─────────────┴─────────────╯ ╰─────────────╯ ╰─────────────┴─────────────╯ ╰─────────────╯ // ╰─────────────╯ ╰─────────────┴─────────────╯ ╰─────────────╯ ╰─────────────┴─────────────╯ ╰─────────────╯