From 825418133b86557da32e9d18d2474e69ee9ec92d Mon Sep 17 00:00:00 2001 From: urob <978080+urob@users.noreply.github.com> Date: Sat, 10 Sep 2022 18:42:37 -0400 Subject: [PATCH] Num-word + some minor tweaks --- config/base.keymap | 18 ++++++++++-------- config/combos.dtsi | 7 ++++--- readme.md | 1 + 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/config/base.keymap b/config/base.keymap index d5de1b5..c7005ac 100644 --- a/config/base.keymap +++ b/config/base.keymap @@ -5,7 +5,6 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" * sticky-hold swallows OS shift when typing quickly, using sticky-tap for now * native sleep key doesn't work with windows (#1077), using sleep-macro for now * invalid DFU suffix signature warning when flashing with dfu-util - * todo: num_word: momentary shift to number layer, auto-cancel on everything that's not a number */ #include @@ -50,7 +49,7 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" }; &sl { // sticky layer config - ignore-modifiers; // no double capitalization when rolling keys + ignore-modifiers; }; < { // layer tap config @@ -59,9 +58,12 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST" quick-tap-ms = ; // double-tap + hold repeats tap-key }; -&caps_word { // caps-word config +&caps_word { /delete-property/ ignore-modifiers; // mods deactivate caps word, requires PR #1422 }; +&num_word { + layers = ; // requires PR #1451 +}; /* homerow mods */ @@ -73,20 +75,20 @@ ZMK_BEHAVIOR(hml, hold_tap, // left-hand HRMs flavor = "balanced"; tapping-term-ms = <280>; quick-tap-ms = ; - global-quick-tap-ms = <150>; + global-quick-tap-ms = <150>; // requires PR #1387 bindings = <&kp>, <&kp>; hold-trigger-key-positions = ; - hold-trigger-on-release; // requires PR #1423 + hold-trigger-on-release; // requires PR #1423 ) ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs flavor = "balanced"; tapping-term-ms = <280>; quick-tap-ms = ; - global-quick-tap-ms = <150>; + global-quick-tap-ms = <150>; // requires PR #1387 bindings = <&kp>, <&kp>; hold-trigger-key-positions = ; - hold-trigger-on-release; // requires PR #1423 + hold-trigger-on-release; // requires PR #1423 ) /* custom keys and macros */ @@ -189,7 +191,7 @@ ZMK_LAYER(num_layer, // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ &kp ESC &kp N7 &kp N8 &kp N9 ___ EXTRA_MID ___ ___ ___ ___ ___ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ - &kp TAB &kp N4 &kp N5 &kp N6 &kp DOT EXTRA_MID ___ &sk RSHFT &sk LCTRL &sk LALT &sk LGUI + &kp TAB &kp N4 &kp N5 &kp N6 &kp DOT EXTRA_MID ___ ___ ___ ___ ___ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ___ &kp N1 &kp N2 &kp N3 &kp COMMA EXTRA_MID ___ ___ ___ ___ ___ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ diff --git a/config/combos.dtsi b/config/combos.dtsi index 9bd67ab..45d49ab 100644 --- a/config/combos.dtsi +++ b/config/combos.dtsi @@ -9,13 +9,14 @@ // use global-quick-tap-ms for combos (requires PR 1387) #undef COMBO_HOOK -#define COMBO_HOOK global-quick-tap-ms = <125>; +#define COMBO_HOOK global-quick-tap-ms = <75>; #define COMBO_TERM_FAST 20 #define COMBO_TERM_SLOW 35 /* Punctuation (horizontal left hand) */ -ZMK_COMBO_ADV(num, &tog NUM, LT3 LT1, DEF NUM, COMBO_TERM_SLOW) +// ZMK_COMBO_ADV(num, &tog NUM, LT3 LT1, DEF NUM, COMBO_TERM_SLOW) +ZMK_COMBO_ADV(num, &num_word, LT3 LT1, DEF NUM, COMBO_TERM_SLOW) ZMK_COMBO_ADV(all, &kp LC(A), LT3 LT2, DEF NUM, COMBO_TERM_FAST) ZMK_COMBO_ADV(app, &kp LG(SPACE), LT2 LT1, DEF NUM, COMBO_TERM_FAST) @@ -56,4 +57,4 @@ ZMK_COMBO_ADV(fslh, &kp FSLH, RM2 RB2, DEF NUM, COMBO_TERM_SLOW) ZMK_COMBO_ADV(pipe, &kp PIPE, RM3 RB3, DEF NUM, COMBO_TERM_SLOW) ZMK_COMBO_ADV(grk, &sl UC, RT1 RT3, DEF NUM, COMBO_TERM_SLOW) -ZMK_COMBO_ADV(cpgrk, &sls 0, RT1 RT2 RT3, DEF NUM, COMBO_TERM_SLOW) +ZMK_COMBO_ADV(cpgrk, &sls 0, RT1 RT2 RT3, DEF NUM, COMBO_TERM_SLOW) diff --git a/readme.md b/readme.md index 4f2a961..132ec21 100644 --- a/readme.md +++ b/readme.md @@ -11,6 +11,7 @@ It is ported from my QMK configuration, which in turn is heavily inspired by Man - keymap and combo setup portable across different physical layouts - ["timeless" homerow mods](#timeless-homerow-mods) on the base layer; sticky mods on other layers +- num-word: a zmk version of smart-layers that automatically de-activate for non-numbers - combos replacing the symbol layer - sticky shift on right thumb, double-tap (or shift + tap)[^1] activates caps-word - shift + space morphs into dot + space + sticky-shift