Num-word + some minor tweaks

This commit is contained in:
urob 2022-09-10 18:42:37 -04:00
parent 9f18c163b2
commit 825418133b
3 changed files with 15 additions and 11 deletions

View file

@ -5,7 +5,6 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now * 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 * native sleep key doesn't work with windows (#1077), using sleep-macro for now
* invalid DFU suffix signature warning when flashing with dfu-util * 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 <behaviors.dtsi> #include <behaviors.dtsi>
@ -50,7 +49,7 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
}; };
&sl { // sticky layer config &sl { // sticky layer config
ignore-modifiers; // no double capitalization when rolling keys ignore-modifiers;
}; };
&lt { // layer tap config &lt { // layer tap config
@ -59,9 +58,12 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
quick-tap-ms = <QUICK_TAP_MS>; // double-tap + hold repeats tap-key quick-tap-ms = <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 /delete-property/ ignore-modifiers; // mods deactivate caps word, requires PR #1422
}; };
&num_word {
layers = <NUM>; // requires PR #1451
};
/* homerow mods */ /* homerow mods */
@ -73,7 +75,7 @@ ZMK_BEHAVIOR(hml, hold_tap, // left-hand HRMs
flavor = "balanced"; flavor = "balanced";
tapping-term-ms = <280>; tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>; quick-tap-ms = <QUICK_TAP_MS>;
global-quick-tap-ms = <150>; global-quick-tap-ms = <150>; // requires PR #1387
bindings = <&kp>, <&kp>; bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_R THUMBS>; hold-trigger-key-positions = <KEYS_R THUMBS>;
hold-trigger-on-release; // requires PR #1423 hold-trigger-on-release; // requires PR #1423
@ -83,7 +85,7 @@ ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs
flavor = "balanced"; flavor = "balanced";
tapping-term-ms = <280>; tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>; quick-tap-ms = <QUICK_TAP_MS>;
global-quick-tap-ms = <150>; global-quick-tap-ms = <150>; // requires PR #1387
bindings = <&kp>, <&kp>; bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_L THUMBS>; hold-trigger-key-positions = <KEYS_L THUMBS>;
hold-trigger-on-release; // requires PR #1423 hold-trigger-on-release; // requires PR #1423
@ -189,7 +191,7 @@ ZMK_LAYER(num_layer,
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ // ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp ESC &kp N7 &kp N8 &kp N9 ___ EXTRA_MID ___ ___ ___ ___ ___ &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 ___ ___ ___ ___ ___ ___ &kp N1 &kp N2 &kp N3 &kp COMMA EXTRA_MID ___ ___ ___ ___ ___
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ // ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤

View file

@ -9,13 +9,14 @@
// use global-quick-tap-ms for combos (requires PR 1387) // use global-quick-tap-ms for combos (requires PR 1387)
#undef COMBO_HOOK #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_FAST 20
#define COMBO_TERM_SLOW 35 #define COMBO_TERM_SLOW 35
/* Punctuation (horizontal left hand) */ /* 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(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) ZMK_COMBO_ADV(app, &kp LG(SPACE), LT2 LT1, DEF NUM, COMBO_TERM_FAST)

View file

@ -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 - keymap and combo setup portable across different physical layouts
- ["timeless" homerow mods](#timeless-homerow-mods) on the base layer; - ["timeless" homerow mods](#timeless-homerow-mods) on the base layer;
sticky mods on other layers 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 - combos replacing the symbol layer
- sticky shift on right thumb, double-tap (or shift + tap)[^1] activates caps-word - sticky shift on right thumb, double-tap (or shift + tap)[^1] activates caps-word
- shift + space morphs into dot + space + sticky-shift - shift + space morphs into dot + space + sticky-shift