#include #include #include #include #define DEFAULT_LAYER 0 #define SPACE_LAYER 1 #define SPECIAL_LAYER 2 #define MOUSE_LAYER 3 // maybe add a game mode or something, which switches layers a bit to make wasd+space better? / { keymap { compatible = "zmk,keymap"; default_layer { bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp Z &kp X &kp C &kp V &sl SPACE_LAYER &kp B &kp N &kp M &kp P >; }; space_layer { bindings = < &kp ESC &kp N1 &kp N2 &kp N3 &kp N0 &kp BSLH &kp MINUS &kp EQUAL &kp BSPC &sk LCTRL &kp N4 &kp N5 &kp N6 &kp LBKT &kp RBKT &kp SEMI &kp SQT &kp RET &kp LGUI &kp N7 &kp N8 &kp N9 &kp SPACE &kp COMMA &kp DOT &kp FSLH &sl SPECIAL_LAYER >; }; special_layer { bindings = < &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp TAB &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &sk LSHFT &kp LALT &trans &trans &trans &none &trans &trans &trans &sl MOUSE_LAYER >; }; mouse_layer { bindings = < &trans &trans &trans &trans &trans &msc SCRL_DOWN &msc SCRL_UP &mkp MCLK &trans &trans &trans &trans &trans &trans &mkp LCLK &mmv MOVE_UP &mkp RCLK &trans &trans &trans &trans &trans &none &mmv MOVE_LEFT &mmv MOVE_DOWN &mmv MOVE_RIGHT &sl SPECIAL_LAYER >; }; // currently, when we press CTRL, we need to release the "main" key to get to the default layer with letters. this slows is down, // cuz most (all?) CTRL+... are with letters. ideally, i would reverse the layer stuff so that pressing CTRL would also move me to the default layer // and releasing space would put me in the space layer. // same should be with shift? // ctrl_layer { // bindings = < // &trans &trans &trans &trans &trans &trans &trans &trans &trans // &trans &trans &trans &trans &trans &trans &trans &trans &trans // &trans &trans &trans &trans &trans &trans &trans &trans &trans // >; // }; move_layer { bindings = < &none &none &none &none &none &none &hx_ctrl_u &none &none &jump_start &none &hx_ctrl_d &jump_end &none &kp LEFT &kp DOWN &kp UP &kp RIGHT &mo 3 &none &none &none &none &none &none &none &none >; }; bt_layer { bindings = < &sys_reset &bt BT_CLR_ALL &bt BT_DISC &bootloader &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none >; }; }; }; / { macros { // zed_em_kay: zed_em_kay { // compatible = "zmk,behavior-macro"; // #binding-cells = <0>; // bindings // = <¯o_press &kp LSHFT> // , <¯o_tap &kp Z &kp M &kp K> // , <¯o_release &kp LSHFT> // ; // }; //swap_ctrl: swap_ctrl { // compatible = "zmk,behavior-macro"; // #binding-cells = <0>; // bindings // = <&to DEFAULT_LAYER>, <&; //}; jump_start: jump_start { compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp LEFT> , <¯o_release &kp LCTRL> ; }; jump_end: jump_end { compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp RIGHT> , <¯o_release &kp LCTRL> ; }; hx_ctrl_d: hx_ctrl_d { compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp D> , <¯o_release &kp LCTRL> ; }; hx_ctrl_u: hx_ctrl_u { compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings = <¯o_press &kp LCTRL> , <¯o_tap &kp U> , <¯o_release &kp LCTRL> ; }; }; };