/* * Copyright (c) 2020 duckyb * * SPDX-License-Identifier: MIT */ #include #include #include #include // Layer definitions #define BASE 0 #define SYM 1 #define NUM 2 #define NAV 3 #define SYM2 3 // ----------------- &sk { // don't release mods on other mods presses ignore-modifiers; }; / { 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"; combo_caps_word { timeout-ms = <100>; key-positions = <20 29>; bindings = <&caps_word>; }; combo_esc { timeout-ms = <150>; key-positions = <12 13 16 17>; bindings = <&kp ESC>; }; // ( combo_lpar { timeout-ms = <150>; key-positions = <4 14>; bindings = <&kp LPAR>; }; // ) combo_rpar { timeout-ms = <150>; key-positions = <5 15>; bindings = <&kp RPAR>; }; // { combo_lcurly { timeout-ms = <150>; key-positions = <3 13>; bindings = <&kp LBRC>; }; // } combo_rcurly { timeout-ms = <150>; key-positions = <6 16>; bindings = <&kp RBRC>; }; // [ combo_lsquare { timeout-ms = <150>; key-positions = <13 23>; bindings = <&kp LBKT>; }; // ] combo_rsquare { timeout-ms = <150>; key-positions = <16 26>; bindings = <&kp RBKT>; }; // < combo_less_than { timeout-ms = <150>; key-positions = <14 24>; bindings = <&kp LT>; }; // > combo_greater_than { timeout-ms = <150>; key-positions = <15 25>; bindings = <&kp GT>; }; combo_minus { timeout-ms = <150>; key-positions = <2 3 6 7>; bindings = <&kp MINUS>; }; combo_under { timeout-ms = <150>; key-positions = <22 23 26 27>; bindings = <&kp UNDER>; }; combo_ble { timeout-ms = <20>; key-positions = <0 1>; bindings = <&out OUT_BLE>; }; // both right thumb keys // internal-left & external-right thumb keys combo_sym2 { timeout-ms = <200>; key-positions = <31 33>; bindings = <&mo SYM2>; }; }; keymap { compatible = "zmk,keymap"; default_layer { bindings = < &kp SQT &kp CMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L &kp A &kp O < FUN E < NAV U &kp I &kp D < SYM H < NUM 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 TAB &mt LGUI SPC &mt LSHIFT RET &mt LCTRL BSPC >; }; nav_layer { bindings = < &bt BT_CLR &trans &trans &bootloader &sys_reset &trans &kp LBRC &kp RBRC &kp LPAR &kp RPAR &bt BT_SEL 0 &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &bt BT_SEL 1 &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &IT_LESS &IT_GREAT &trans &trans &trans &kp BSPC >; }; num_layer { bindings = < &trans &kp F7 &kp F8 &kp F9 &trans &trans &trans &trans &trans &trans &kp DQT &kp F4 &kp F5 &kp F6 &kp EQUAL &trans &trans &trans &trans &trans &kp GRAVE &kp F1 &kp F2 &kp F3 &kp BSLH &trans &trans &trans &trans &trans &trans &trans &trans &trans >; }; sym_layer { label = "Sym."; bindings = < &kp LS(Q) &kp LS(Z) &kp STAR &kp AMPS &trans &sys_reset &bootloader &trans &trans &trans &kp DQT &kp CARET &kp PRCNT &kp DLLR &kp KP_PLUS &trans &trans &trans &trans &trans &kp TILDE &kp HASH &kp AT &kp EXCL &kp PIPE &trans &trans &trans &trans &trans &kp LPAR &kp RPAR &trans &trans >; }; }; };