-
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.
- Loading branch information
1 parent
efe1217
commit 38d9d72
Showing
3 changed files
with
165 additions
and
3 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
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,164 @@ | ||
/* | ||
* Copyright (c) 2020 The ZMK Contributors | ||
* | ||
* SPDX-License-Identifier: MIT | ||
*/ | ||
#include "../zmk-nodefree-config/helper.h" | ||
|
||
#include <dt-bindings/zmk/mouse.h> | ||
#include <behaviors.dtsi> | ||
#include <dt-bindings/zmk/keys.h> | ||
#include <dt-bindings/zmk/bt.h> | ||
#include <behaviors/mouse_keys.dtsi> | ||
|
||
|
||
#define WIN 0 | ||
#define MAC 1 | ||
#define NAV 2 | ||
#define SYM 3 | ||
#define FN 4 | ||
#define CFG 5 | ||
#define MSE 6 | ||
|
||
//universial keycodes | ||
|
||
#define L_SYM &mo SYM | ||
#define L_FN &mo FN | ||
#define L_CFG &mo CFG | ||
#define L_NAV &mo NAV | ||
#define TAB_C &kp LC(TAB) | ||
|
||
#define LT_SP < MSE SPACE | ||
|
||
// winos keycodes | ||
#define WHF &hm LCTRL F | ||
#define WHD &hm LALT D | ||
#define WHJ &hm RCTRL J | ||
#define WHK &hm RALT K | ||
#define LANGW &mt RSHFT RALT | ||
#define ESCW &mt LGUI ESC | ||
|
||
|
||
// macos keycodes | ||
#define MHF &hm LGUI F | ||
#define MHD &hm LALT D | ||
#define MHJ &hm RGUI J | ||
#define MHK &hm RALT K | ||
#define OBS &hm LA(LSFT) A | ||
#define OBS_C &hm LC(LA(LSFT)) A | ||
#define LANGM &mt RALT LC(SPACE) | ||
#define ESCM &mt LCTRL ESC | ||
|
||
|
||
&mt { | ||
tapping-term-ms = <125>; | ||
}; | ||
/ { | ||
behaviors { | ||
hm: homerow_mods { | ||
compatible = "zmk,behavior-hold-tap"; | ||
#binding-cells = <2>; | ||
tapping-term-ms = <150>; | ||
quick-tap-ms = <0>; | ||
flavor = "tap-preferred"; | ||
bindings = <&kp>, <&kp>; | ||
}; | ||
}; | ||
keymap { | ||
compatible = "zmk,keymap"; | ||
win_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | | ||
// | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | BSLH | | ||
// | GUI | LWR | SPC | | ENT | RSE | ALT | | ||
bindings = < | ||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC | ||
ESCW &kp A &kp S WHD WHF &kp G &kp H WHJ WHK &kp L &kp SEMI &kp SQT | ||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH | ||
&kp LCTRL L_NAV LT_SP &kp RET L_SYM &kp RALT | ||
>; | ||
}; | ||
mac_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP | | ||
// | ESC | A | S | D | F | G | | H | J | K | L | ; | ' | | ||
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | BSLH | | ||
// | CTL | LWR | SPC | | ENT | RSE | ALT | | ||
bindings = < | ||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC | ||
ESCM OBS &kp S MHD MHF &kp G &kp H MHJ MHK &kp L &kp SEMI &kp SQT | ||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp BSLH | ||
&kp LGUI L_NAV LT_SP &kp RET L_SYM LANGM | ||
>; | ||
}; | ||
nav_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | | ||
// | SHFT | | | | | | | | | | | | ~ | | ||
// | GUI | | SPC | | ENT | | ALT | | ||
bindings = < | ||
TAB_C &trans &trans &trans &trans &trans &kp DEL &kp PG_UP &kp HOME &kp END &kp PG_DN &kp BSPC | ||
&trans OBS_C &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp COLON &kp KP_EQUAL | ||
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &kp F11 &kp F12 &kp UNDER &kp TILDE | ||
&trans &trans &trans &kp RET L_FN &trans | ||
>; | ||
}; | ||
sym_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
// | CTRL | - | { | [ | ( | _ | | * | ) | ] | } | + | = | | ||
// | SHFT | ! | @ | # | $ | % | | ^ | & | , | , | / | ` | | ||
// | GUI | | SPC | | ENT | | ALT | | ||
bindings = < | ||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC | ||
&trans &kp UNDER &kp LBRC &kp LBKT &kp LPAR &kp MINUS &kp PLUS &kp RPAR &kp RBKT &kp RBRC &kp KP_MULTIPLY &kp KP_EQUAL | ||
&kp LSHFT &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp COMMA &kp DOT &kp FSLH &trans | ||
&trans L_FN &trans &kp RET &trans &trans | ||
>; | ||
}; | ||
|
||
fn_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | | ||
// | SHFT | | | | | | | | | | | | | | ||
// | GUI | | SPC | | ENT | | ALT | | ||
bindings = < | ||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 | ||
&kp C_PWR &none &kp C_PREV &kp C_PP &kp C_NEXT &none &kp C_BRI_DN &kp C_VOL_DN &kp C_VOL_UP &kp C_BRI_UP &none &none | ||
&kp LSHFT &none &none &none &none &none &none &kp C_MUTE &none &none &none L_CFG | ||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT | ||
>; | ||
}; | ||
cfg_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | | ||
// | SHFT | | | | | | | | | | | | | | ||
// | GUI | | SPC | | ENT | | ALT | | ||
bindings = < | ||
&kp TAB &to WIN &to MAC &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC | ||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans | ||
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans | ||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT | ||
>; | ||
}; | ||
mse_layer { | ||
// ----------------------------------------------------------------------------------------- | ||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | | ||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | | ||
// | SHFT | | | | | | | | | | | | ~ | | ||
// | GUI | | SPC | | ENT | | ALT | | ||
bindings = < | ||
&none &none &msc SCRL_LEFT &msc SCRL_RIGHT &msc SCRL_UP &none &none &none &none &none &none &none | ||
&trans &none &mkp MCLK &mkp RCLK &mkp LCLK &none &none &trans &trans &none &none &none | ||
&kp LSHFT &none &none &none &msc SCRL_DOWN &none &none &none &none &none &none &none | ||
&trans &none &trans &kp RET &none &none | ||
>; | ||
}; | ||
}; | ||
}; | ||
|
||
|