/* * Copyright (c) 2020 duckyb * * SPDX-License-Identifier: MIT */ #include #include #include #include // Layer definitions #define BASE 0 #define SYM 1 #define EXT 2 #define FNC 3 #define SETTINGS 6 // ----------------- &sk { // don't release mods on other mods presses ignore-modifiers; }; &mt { flavor = "tap-preferred"; tapping_term_ms = <200>; quick_tap_ms = <75>; }; / { behaviors { // Enables holding the first mod-tap key // by performing a tap-release-hold sequence. // To use it: "&qt KEYCODE1 KEYCODE2" qt: quick_tap { compatible = "zmk,behavior-hold-tap"; label = "QUICK_TAP"; #binding-cells = <2>; flavor = "hold-preferred"; tapping-term-ms = <200>; quick-tap-ms = <200>; bindings = <&kp>, <&kp>; }; }; macros { // sometimes my device thinks a modifier is being held down // pressing all modifiers fixes it. unstick: unstick { label = "ZM_unstick"; compatible = "zmk,behavior-macro"; #binding-cells = <0>; bindings = <&kp LSHIFT &kp RSHIFT &kp LCTRL &kp RCTRL &kp LALT &kp RALT &kp LGUI &kp RGUI>; }; }; combos { compatible = "zmk,combos"; // both right thumb keys // internal-left & external-right thumb keys // both left thumb keys combo_settings { timeout-ms = <200>; key-positions = <30 31>; bindings = <&mo SETTINGS>; }; // left index & middle fingers (home-row) // hold control & space for Adobe workflow combo_ctrl_space { timeout-ms = <200>; key-positions = <12 13>; bindings = <&kp LC(SPACE)>; layers = ; }; }; keymap { compatible = "zmk,keymap"; // Base alpha layer default_layer { label = "Base"; bindings = < &kp DOT &kp COMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L &kp A &kp O &kp E &kp U &kp I &kp D &kp H &kp T &kp N &kp S &kp SCLN &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z &mt LALT SPC &mt LGUI TAB &mt LSHIFT RET &mt LCTRL BSPC >; }; // Numbers and high frequency symbols sym_layer { label = "Sym."; bindings = < &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &mo FNC &none &trans &trans >; }; // Main modifiers and arrow keys ext_layer { label = "Mods"; bindings = < &kp ESC &kp C_PREV &kp C_PP &kp C_NEXT &kp C_PAUSE &kp PG_UP &kp HOME &kp UP &kp END &kp CAPS &sk LALT &sk LGUI &sk LSHIFT &sk LCTRL &kp RALT &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp LC(Z) &kp LC(X) &kp LC(C) &kp TAB &kp LC(V) &kp LC(BSPC) &kp BSPC &trans &trans &trans &trans &kp LCTRL &kp ENTER &mo FNC >; }; // Function keys with modifiers fnc_layer { label = "FRow"; bindings = < &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &sk LALT &sk LGUI &sk LSHIFT &sk LCTRL &kp RALT &kp F11 &kp F12 &kp PRINTSCREEN &trans &trans &none &none &none &none &none &none &none &none &none &none &none &none &none &none >; }; // Used to change the keyboard's settings. settings_layer { label = "Sett."; bindings = < &bootloader &none &none &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 3 &none &unstick &none &bootloader &none &none &none &none &bt BT_SEL 1 &bt BT_SEL 4 &none &none &none &none &none &none &none &none &bt BT_SEL 2 &bt BT_SEL 5 &none &none &none &none &none &none &none &none >; }; }; };