Skip to content

Commit

Permalink
rmv unsupported masked moprh modifier zmkfirmware/zmk#1114
Browse files Browse the repository at this point in the history
  • Loading branch information
vresch committed May 11, 2022
1 parent b972e86 commit 2990690
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 73 deletions.
104 changes: 59 additions & 45 deletions config/kyria-custom-02-cyr.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,33 @@
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>

// Layers
#define LLTR 0
#define LNBR 1
#define LNAV 2
#define LFUN 3

#define PTAB LC(LS(TAB))
#define NTAB LC(TAB)
#define NWIN LC(RIGHT)
#define PWIN LC(LEFT)
#define PDESK LC(LEFT)
#define NDESK LC(RIGHT)
//GUI nav MacOS
#define NTAB LG(TAB)
#define PTAB LG(LS(TAB))
#define NWIN LC(TAB)
#define PWIN LC(LS(TAB))
#define PDKT LG(LEFT)
#define NDKT LG(RIGHT)
//switch input source
#define LANG LC(SPACE)

//cut copy paste
// #define CCUT LC(X)
// #define CCOPY LC(C)
// #define CPASTE LC(V)

//undo redo
// #define CUNDO LC(Z)
// #define CREDO LC(LS(Z))

//find, select all?, F5(reload/debug)

&sl {
release-after-ms = <1000>;
};
Expand All @@ -31,15 +45,15 @@
// bindings = <&kp>, <&cp>;
// };
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
#binding-cells = <2>;
tapping_term_ms = <220>;
flavor = "balanced";
bindings = <&kp>, <&kp>;
};

mx: layer_tap_FNC {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
#binding-cells = <2>;
tapping_term_ms = <220>;
flavor = "balanced";
bindings = <&kp>, <&kp>;
};

mx: layer_tap_FNC {
compatible = "zmk,behavior-hold-tap";
label = "LAYER_TAP_FNC";
#binding-cells = <2>;
Expand All @@ -48,9 +62,9 @@
bindings = <&mo>, <&sl>;
};

lc: layer_tap_cmd_hold {
lc: layer_tap_mod_hold {
compatible = "zmk,behavior-hold-tap";
label = "LAYER_TAP_CMD_HOLD";
label = "LAYER_TAP_MOD_HOLD";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping_term_ms = <200>;
Expand All @@ -71,52 +85,52 @@

letter_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | Esc/~ | Q | W | E | R | T | | Y | U | I | O | P | ' |
// | [ | A | S | D | F/Sht| G | | H | J/Sht | K | L | ; | ] |
// | Tab | Z | X | C | V | B | Lang | Cmd | | Cmd | --- | N | M | , | . | / | ` |
// | , | ?/Alt|L1/Cmd| Ret | ( | | ) | Bspc | Spc | Del/Alt | . |
// | Esc/` | Q | W | E | R | T | | Y | U | I | O | P | '/" |
// | [ | A | S | D | F/Shf| G | | H | J/Shf | K | L | ;/: | ] |
// | Tab | Z | X | C | V | B | Lang | CAPS | | Ins | Del | N | M | , | . | -/_ | `/~ |
// |,</Gui| =/Alt|L1/Ctr | Ret | ( | | ) | Bsp |Spc/Ctr| ?/Alt | ./> |
bindings = <
&kp gresc &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SQT
&kp LBKT &kp A &kp S &kp D &hm LSHIFT F &kp G &kp H &hm RSHFT J &kp K &kp L &kp SEMI &kp RBKT
&kp TAB &kp Z &kp X &kp C &kp V &kp B &kp LANG &kp LCMD &kp RCMD &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp GRAVE
&kp COMMA &mt LALT CAPS &lc LCMD 1 &kp RET &kp LPAR &kp RPAR &kp BSPC &kp SPC &mt RALT DEL &kp DOT
&gresc &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SQT
&kp LBKT &kp A &kp S &kp D &hm LSHFT F &kp G &kp H &hm RSHFT J &kp K &kp L &kp SEMI &kp RBKT
&kp TAB &kp Z &kp X &kp C &kp V &kp B &kp LANG &kp CAPS &kp INS &kp DEL &kp N &kp M &kp COMMA &kp DOT &kp MINUS &kp GRAVE
&hm LGUI COMMA &hm LALT EQUAL &lc LCTRL 1 &kp RET &kp LPAR &kp RPAR &kp BSPC &hm RCTRL SPACE &hm RALT QMARK &kp DOT
>;
};

num_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | --- | / | * | - | + | | | | F12 | 7 | 8 | 9 | --- | --- |
// | --- | # | $ | @ | ! | _ | | F11 | 4 | 5 | 6 | 0 | --- |
// | --- | \ | ^ | & | % | --- | --- | --- | | --- | --- | F10 | 1 | 2 | 3 | --- | --- |
// | --- | = |L2/Cmd| --- | --- | | --- | --- | L0 | --- | --- |
// | --- | ^ | # | \ | + | * | | F12 | 7 | 8 | 9 | | | --- |
// | --- | & | $ | @ |!/Shf | / | | F11 | 4/Shf | 5 | 6 | 0 | --- |
// | --- | --- | --- | --- | --- | % | --- | --- | | --- | --- | F10 | 1 | 2 | 3 | --- | --- |
// | --- | --- |L2/Ctr | --- | --- | | --- | --- |L0/Ctr | --- | --- |
bindings = <
&trans &kp FSLH &kp STAR &kp MINUS &kp PLUS &kp PIPE &kp F12 &kp N7 &kp N8 &kp N9 &trans &trans
&trans &kp HASH &kp DLLR &kp AT &kp EXCL &kp UNDER &kp F11 &kp N4 &kp N5 &kp N6 &kp N0 &trans
&trans &kp BSLH &kp CARET &kp AMPS &kp PRCNT &trans &trans &trans &trans &trans &kp F10 &kp N1 &kp N2 &kp N3 &trans &trans
&trans &kp EQUAL &lc LCMD 2 &trans &trans &trans &trans &trans &lc RCMD 0 &trans &trans
&trans &kp CARET &kp HASH &kp BSLH &kp PLUS &kp STAR &kp F12 &kp N7 &kp N8 &kp N9 &kp PIPE &trans
&trans &kp AMPS &kp DLLR &kp AT &hm LSHFT EXCL &kp FSLH &kp F11 &hm RSHFT N4 &kp N5 &kp N6 &kp N0 &trans
&trans &trans &trans &trans &trans &kp PRCNT &trans &trans &trans &trans &kp F10 &kp N1 &kp N2 &kp N3 &trans &trans
&trans &trans &lc LCTRL 2 &trans &trans &trans &trans &lc RCTRL 0 &trans &trans
>;
};

nav_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | --- | --- | --- | win+ | win- | --- | | Pgup | Home | Up | End | ScrUp | --- |
// | --- | Tab+| Tab-| Alt | Sht | app | | Pgdw | Left | Down | Right| ScrDn | --- |
// | --- | --- | F2 | F3 | F5 | --- | --- | --- | | --- | --- | | Predk| --- | NxDk | --- | --- |
// | --- | --- | Cmd | Ctl | --- | | --- | Ins | L0 | --- | --- |
// | --- | --- | --- | Tab- | Tab+ | Vol+ | | Pgup | Home | Up | End | --- | --- |
// | --- | Win-| Win+| Alt | Shf | Vol- | | Pgdw | Left | Down | Right| --- | --- |
// | --- | --- | --- | --- | --- | Mute | Play | App | | --- | --- | none | Dkt- | none | Dkt+ | --- | --- |
// | Gui | Alt | Ctr | --- | --- | | --- | --- |L0/Ctr | Alt | Gui |
bindings = <
&trans &trans &trans &kp PWIN &kp NWIN &trans &kp PG_UP &kp HOME &kp UP &kp END &kp K_SCROLL_UP &trans
&trans &kp PTAB &kp NTAB &kp LALT &kp LSHFT &kp K_APP &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp K_SCROLL_DOWN &trans
&trans &trans &kp F2 &kp F3 &kp F5 &trans &trans &trans &trans &trans &trans &kp NDESK &trans &kp PDESK &trans &trans
&trans &trans &kp LCMD &trans &trans &trans &INS &lc RCMD 0 &trans &trans
&trans &trans &trans &kp PTAB &kp NTAB &kp C_VOL_UP &kp PG_UP &kp HOME &kp UP &kp END &trans &trans
&trans &kp PWIN &kp NWIN &kp LALT &kp LSHFT &kp C_VOL_DN &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans
&trans &trans &trans &trans &trans &kp C_MUTE &kp C_PP &kp K_APP &trans &trans &none &kp PDKT &none &kp NDKT &trans &trans
&kp LGUI &kp LALT &kp LCTRL &trans &trans &trans &trans &lc RCTRL 0 &kp RALT &kp RGUI
>;
};

function_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | none | F2 | mute| V+ | stp | --- | | F12 | F7 | F8 | F9 | Print| none |
// | none | caps| Prev| V- | Next | --- | | F11 | F4 | F5 | F6 | Ins | none |
// | none | /Ble| Ble0| Ble1 | Ble2 | Ble3 | Ble4 | Out | | --- | --- | F10 | F1 | F2 | F3 | --- | none |
// | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
// | none | F2 | mute| V+ | stp | --- | | F12 | F7 | F8 | F9 | Print| none |
// | none | caps| Prev| V- | Next | --- | | F11 | F4 | F5 | F6 | Ins | none |
// | none | /Ble| Ble0| Ble1 | Ble2 | Ble3 | Ble4 | Out | | --- | --- | F10 | F1 | F2 | F3 | --- | none |
// | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
bindings = <
&trans &kp F2 &kp C_MUTE &kp C_VOL_UP &kp C_STOP &none &kp F12 &kp F7 &kp F8 &kp F9 &kp PSCRN &trans
&trans &kp CAPS &kp C_PREV &kp C_VOL_DN &kp C_NEXT &none &kp F11 &kp F4 &kp F5 &kp F6 &kp INS &trans
Expand Down
151 changes: 151 additions & 0 deletions config/kyria-custom-03-shft-map.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>

// Layers
#define LLTR 0
#define LNBR 1
#define LNAV 2
#define LFUN 3

//GUI nav MacOS
#define NTAB LG(TAB)
#define PTAB LG(LS(TAB))
#define NWIN LC(TAB)
#define PWIN LC(LS(TAB))
#define PDKT LG(LEFT)
#define NDKT LG(RIGHT)
//switch input source
#define LANG LC(SPACE)

//cut copy paste
// #define CCUT LC(X)
// #define CCOPY LC(C)
// #define CPASTE LC(V)

//undo redo
// #define CUNDO LC(Z)
// #define CREDO LC(LS(Z))

//find, select all?, F5(reload/debug)

&sl {
release-after-ms = <1000>;
};

/ {
behaviors {
// hm: homerow_mods {
// compatible = "zmk,behavior-hold-tap";
// label = "HOMEROW_MODS";
// #binding-cells = <2>;
// tapping_term_ms = <200>;
// flavor = "tap-preferred";
// bindings = <&kp>, <&cp>;
// };
hm: homerow_mods {
compatible = "zmk,behavior-hold-tap";
label = "homerow mods";
#binding-cells = <2>;
tapping_term_ms = <220>;
flavor = "balanced";
bindings = <&kp>, <&kp>;
};

mx: layer_tap_FNC {
compatible = "zmk,behavior-hold-tap";
label = "LAYER_TAP_FNC";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping_term_ms = <200>;
bindings = <&mo>, <&sl>;
};

lc: layer_tap_mod_hold {
compatible = "zmk,behavior-hold-tap";
label = "LAYER_TAP_MOD_HOLD";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping_term_ms = <200>;
bindings = <&kp>, <&to>;
};

gresc: grave_escape {
compatible = "zmk,behavior-mod-morph";
label = "GRAVE_ESCAPE";
#binding-cells = <0>;
bindings = <&kp ESC>, <&kp GRAVE>;
mods = <(MOD_LGUI|MOD_LSFT|MOD_RGUI|MOD_RSFT)>;
};

sm: shift_mod {
compatible = "zmk,behavior-mod-morph";
label = "SHIFT_MOD";
#binding-cells = <2>;
bindings = <&kp>, <&kp>;
mods = <(MOD_LSFT|MOD_RSFT)>;
};
};

keymap {
compatible = "zmk,keymap";

letter_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | Esc/` | Q | W | E | R | T | | Y | U | I | O | P | '/" |
// | [/< | A | S | D | F/Shf| G | | H | J/Shf | K | L | ;/: | ]/> |
// | Tab | Z | X | C | V | B | Lang | CAPS | | Ctr | Ins | N | M | , | . | -/_ | `/~ |
// |,/Gui | =/Alt|L1/Ctr | Ret | (/{ | | )/} | Bsp/Del |Spc/Ctr| Alt | ./? |
bindings = <
&gresc &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp SQT
&sm LBKT LT &kp A &kp S &kp D &hm LSHFT F &kp G &kp H &hm RSHFT J &kp K &kp L &kp SEMI &sm RBKT GT
&kp TAB &kp Z &kp X &kp C &kp V &kp B &kp LANG &kp CAPS &kp RCTRL &kp INS &kp N &kp M &kp COMMA &kp DOT &kp MINUS &kp GRAVE
&hm LGUI COMMA &hm LALT EQUAL &lc LCTRL 1 &kp RET &sm LPAR LBRC &sm RPAR RBRC &sm BSPC DEL &hm RCTRL SPACE &kp RALT &sm DOT QMARK
>;
};

num_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | --- | ^ | # | \ | + | * | | F12 | 7 | 8 | 9 | | | --- |
// | --- | & | $ | @ |!/Shf | / | | F11 | 4/Shf | 5 | 6 | 0 | --- |
// | --- | --- | --- | --- | --- | % | --- | --- | | --- | --- | F10 | 1 | 2 | 3 | --- | --- |
// | --- | = |L2/Ctr | --- | --- | | --- | --- |L0/Ctr | --- | --- |
bindings = <
&trans &kp CARET &kp HASH &kp BSLH &kp PLUS &kp STAR &kp F12 &kp N7 &kp N8 &kp N9 &kp PIPE &trans
&trans &kp AMPS &kp DLLR &kp AT &hm LSHFT EXCL &kp FSLH &kp F11 &hm RSHFT N4 &kp N5 &kp N6 &kp N0 &trans
&trans &trans &trans &trans &trans &kp PRCNT &trans &trans &trans &trans &kp F10 &kp N1 &kp N2 &kp N3 &trans &trans
&trans &trans &lc LCTRL 2 &trans &trans &trans &trans &lc RCTRL 0 &trans &trans
>;
};

nav_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | --- | --- | --- | Tab- | Tab+ | Vol+ | | Pgup | Home | Up | End | --- | --- |
// | --- | Win-| Win+| Alt | Shf | Vol- | | Pgdw | Left | Down | Right| --- | --- |
// | --- | --- | --- | --- | --- | Mute | Play | App | | --- | --- | | Dkt- | --- | Dkt+ | --- | --- |
// | Gui | Alt | Ctr | --- | --- | | --- | --- |L0/Ctr | --- | --- |
bindings = <
&trans &trans &trans &kp PTAB &kp NTAB &kp C_VOL_UP &kp PG_UP &kp HOME &kp UP &kp END &trans &trans
&trans &kp PWIN &kp NWIN &kp LALT &kp LSHFT &kp C_VOL_DN &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans
&trans &trans &trans &trans &trans &kp C_MUTE &kp C_PP &kp K_APP &trans &trans &trans &kp PDKT &trans &kp NDKT &trans &trans
&kp LGUI &kp LALT &kp LCTRL &trans &trans &trans &trans &lc RCTRL 0 &trans &trans
>;
};

function_layer {
// ---------------------------------------------------------------------------------------------------------------------------------
// | none | F2 | mute| V+ | stp | --- | | F12 | F7 | F8 | F9 | Print| none |
// | none | caps| Prev| V- | Next | --- | | F11 | F4 | F5 | F6 | Ins | none |
// | none | /Ble| Ble0| Ble1 | Ble2 | Ble3 | Ble4 | Out | | --- | --- | F10 | F1 | F2 | F3 | --- | none |
// | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
bindings = <
&trans &kp F2 &kp C_MUTE &kp C_VOL_UP &kp C_STOP &none &kp F12 &kp F7 &kp F8 &kp F9 &kp PSCRN &trans
&trans &kp CAPS &kp C_PREV &kp C_VOL_DN &kp C_NEXT &none &kp F11 &kp F4 &kp F5 &kp F6 &kp INS &trans
&trans &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &out OUT_TOG &none &none &kp F10 &kp F1 &kp F2 &kp F3 &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};

};
};
Loading

0 comments on commit 2990690

Please sign in to comment.