-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rmv unsupported masked moprh modifier zmkfirmware/zmk#1114
- Loading branch information
Showing
3 changed files
with
230 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
>; | ||
}; | ||
|
||
}; | ||
}; |
Oops, something went wrong.