Skip to content

Commit

Permalink
num word
Browse files Browse the repository at this point in the history
  • Loading branch information
DusanLesan committed Oct 12, 2024
1 parent 98c9d34 commit 967f139
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 19 deletions.
75 changes: 56 additions & 19 deletions config/kb.keymap
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <behaviors/num_word.dtsi>

&lt {
tapping-term-ms = <300>;
flavor = "hold-preferred";
};

#define ALP 0
#define NUM 1
#define SYM 2
#define NAV 3
#define FUN 4
#define GAM 5

&num_word {
continue-list = <BSPC DEL DOT COMMA>;
};

/ {
behaviors {
shift_sym: shift_sym {
compatible = "zmk,behavior-mod-morph";
label = "SHIFT_SYM";
bindings = <&lt 1 ENTER>, <&to 1>;
bindings = <&lt SYM ENTER>, <&to SYM>;

#binding-cells = <0>;
mods = <(MOD_LSFT|MOD_RSFT)>;
Expand All @@ -21,7 +33,7 @@
shift_nav: shift_nav {
compatible = "zmk,behavior-mod-morph";
label = "SHIFT_NAV";
bindings = <&lt 2 SPACE>, <&to 2>;
bindings = <&lt NAV SPACE>, <&to NAV>;

#binding-cells = <0>;
mods = <(MOD_LSFT|MOD_RSFT)>;
Expand Down Expand Up @@ -54,6 +66,21 @@
mods = <(MOD_LSFT|MOD_RSFT)>;
};

td_num: td_num {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&num_word NUM>, <&sl NUM>;
};

lt_num: lt_num {
compatible = "zmk,behavior-hold-tap";
label = "LT_NUM";
bindings = <&mo>, <&td_num>;
#binding-cells = <2>;
tapping-term-ms = <200>;
flavor = "balanced";
};
};

combos {
Expand Down Expand Up @@ -83,45 +110,55 @@

alpha {
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &bc_del
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp K_FORWARD &kp LSHFT &mo 3 &kp K_BACK &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BACKSLASH
&kp LCTRL &kp LALT &kp LGUI &mt LCTRL SPACE &shift_nav &shift_sym &mt RIGHT_SHIFT ENTER &kp RIGHT_GUI &kp RIGHT_ALT &kp K_MENU
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &bc_del
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&lt_num NUM 0 &kp Z &kp X &kp C &kp V &kp B &kp K_FORWARD &kp LSHFT &mo FUN &kp K_BACK &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BACKSLASH
&kp LCTRL &kp LALT &kp LGUI &mt LCTRL SPACE &shift_nav &shift_sym &mt RIGHT_SHIFT ENTER &kp RIGHT_GUI &kp RIGHT_ALT &kp K_MENU
>;
};

num {
bindings = <
&trans &trans &kp N7 &kp N8 &kp N9 &trans &trans &trans &trans &trans &trans &trans
&trans &trans &kp N4 &kp N5 &kp N6 &trans &trans &trans &trans &trans &trans &trans
&trans &kp N0 &kp N1 &kp N2 &kp N3 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};


sym {
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp EQUAL
&kp BSPC &kp EXCL &kp AT_SIGN &kp HASH &kp DOLLAR &kp PERCENT &kp CARET &kp AMPERSAND &kp ASTERISK &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp PLUS
&kp PIPE &kp BACKSLASH &kp COLON &kp SEMICOLON &kp MINUS &kp LEFT_BRACKET &kp LEFT_BRACE &trans &trans &kp RIGHT_BRACE &kp RIGHT_BRACKET &kp UNDERSCORE &kp COMMA &kp PERIOD &kp SLASH &kp QUESTION
&trans &trans &trans &trans &trans &to 0 &trans &trans &trans &trans
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp EQUAL
&kp BSPC &kp EXCL &kp AT_SIGN &kp HASH &kp DOLLAR &kp PERCENT &kp CARET &kp AMPERSAND &kp ASTERISK &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp PLUS
&kp PIPE &kp BACKSLASH &kp COLON &kp SEMICOLON &kp MINUS &kp LEFT_BRACKET &kp LEFT_BRACE &trans &trans &kp RIGHT_BRACE &kp RIGHT_BRACKET &kp UNDERSCORE &kp COMMA &kp PERIOD &kp SLASH &kp QUESTION
&trans &trans &trans &trans &trans &to ALP &trans &trans &trans &trans
>;
};

nav {
bindings = <
&trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP_ARROW &kp END &kp C_VOLUME_UP &kp DELETE
&kp C_PLAY_PAUSE &kp K_PLAY_PAUSE &trans &trans &trans &trans &kp PAGE_DOWN &kp LEFT &kp DOWN &kp RIGHT &kp C_VOL_DN &kp INSERT
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PLAY &kp C_STOP &kp C_PREVIOUS &kp C_NEXT &kp C_MUTE &kp PRINTSCREEN
&trans &trans &trans &trans &to 0 &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &kp PG_UP &kp HOME &kp UP_ARROW &kp END &kp C_VOLUME_UP &kp DELETE
&kp C_PLAY_PAUSE &kp K_PLAY_PAUSE &trans &trans &trans &trans &kp PAGE_DOWN &kp LEFT &kp DOWN &kp RIGHT &kp C_VOL_DN &kp INSERT
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp C_PLAY &kp C_STOP &kp C_PREVIOUS &kp C_NEXT &kp C_MUTE &kp PRINTSCREEN
&trans &trans &trans &trans &to ALP &trans &trans &trans &trans &trans
>;
};

funct {
bindings = <
&trans &kp F9 &kp F10 &kp F11 &kp F12 &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
&trans &kp F5 &kp F6 &kp F7 &kp F8 &trans &trans &trans &trans &trans &trans &trans
&trans &kp F1 &kp F2 &kp F3 &kp F4 &trans &trans &trans &trans &tog 4 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp F9 &kp F10 &kp F11 &kp F12 &trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_CLR
&trans &kp F5 &kp F6 &kp F7 &kp F8 &trans &trans &trans &trans &trans &trans &trans
&trans &kp F1 &kp F2 &kp F3 &kp F4 &trans &trans &trans &trans &tog GAM &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};

game {
bindings = <
&trans &trans &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans &trans
&trans &trans &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans
&tog 0 &trans &kp Z &kp X &kp C &kp V &kp G &kp I &trans &trans &trans &trans &trans &trans &trans &tog 0
&tog 0 &trans &kp Z &kp X &kp C &kp V &kp G &kp I &trans &trans &trans &trans &trans &trans &trans &tog ALP
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
Expand Down
5 changes: 5 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: urob
url-base: https://github.com/urob
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
- name: zmk-auto-layer
remote: urob
revision: main
self:
path: config

0 comments on commit 967f139

Please sign in to comment.