diff --git a/zmk-config/config/corne.conf b/zmk-config/config/corne.conf new file mode 100644 index 00000000..ff3d2fc7 --- /dev/null +++ b/zmk-config/config/corne.conf @@ -0,0 +1,20 @@ +# Copyright (c) 2021 Mike "KemoNine" Crosson +# SPDX-License-Identifier: MIT + +# Tune combos to allow proper ARTSEY support +CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16 +CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8 +CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8 + +# Tune bluetooth profiles for quick select +CONFIG_BT_MAX_CONN=6 + +# Enable display (layer in use is helpful) +CONFIG_ZMK_DISPLAY=y + +# Turn on deep sleep +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 + +# Set screen blanking to 15s instead of 30s +#CONFIG_ZMK_IDLE_TIMEOUT=15000 diff --git a/zmk-config/config/corne.keymap b/zmk-config/config/corne.keymap new file mode 100644 index 00000000..9dd63007 --- /dev/null +++ b/zmk-config/config/corne.keymap @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + /***************************************** + * - YOU MUST SET THE FOLLOWING CONFIG VALUES FOR THIS SETUP TO WORK PROPERLY IN YOUR BOARDS .conf FILE + * - CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16 + * - CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8 + * - CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8 + *****************************************/ + +//////////////////////////////////////// +// Various includes +#include +#include +#include +#include +#include +#include + +//////////////////////////////////////// +// Layers +#define LAYER_ID_GLOBAL -1 +#define LAYER_ID_DEFAULT 0 +#define LAYER_ID_FUNC 1 +#define LAYER_ID_NAV 2 +#define LAYER_ID_BASE 3 +#define LAYER_ID_NUMBERS 4 +#define LAYER_ID_SYMBOLS 5 +#define LAYER_ID_PARENTHETICALS 6 +#define LAYER_ID_NAVIGATION 7 +#define LAYER_ID_BT_SEL 8 +#define LAYER_ID_CUSTOM 9 +#define LAYER_ID_BIG_SYM 10 +#define LAYER_ID_BIG_FUNCTION 11 +#define LAYERS_ARTSEY_BASE LAYER_ID_DEFAULT LAYER_ID_BASE +#define LAYERS_ARTSEY LAYER_ID_BASE LAYER_ID_NUMBERS LAYER_ID_SYMBOLS LAYER_ID_PARENTHETICALS LAYER_ID_NAVIGATION LAYER_ID_BT_SEL LAYER_ID_CUSTOM LAYER_ID_BIG_SYM LAYER_ID_BIG_FUNCTION +#define LAYERS_ARTSEY_PLUS LAYER_ID_DEFAULT LAYERS_ARTSEY + +//////////////////////////////////////// +// Artsey definitions +#define ARTSEY_BT_TOP &out OUT_BLE +#define ARTSEY_BT_BOTTOM &out OUT_USB +#define TIMEOUT_COMBO_2 150 +#define TIMEOUT_COMBO_3 150 +#define TIMEOUT_COMBO_4 150 +#define TIMEOUT_LAYER_HOLD 200 +#define ARTSEY_BASE_A A +#define ARTSEY_BASE_R R +#define ARTSEY_BASE_T T +#define ARTSEY_BASE_S S +#define ARTSEY_BASE_E E +#define ARTSEY_BASE_Y Y +#define ARTSEY_BASE_I I +#define ARTSEY_BASE_O O +#define ARTSEY_COMBO_N N +#define KEY_A 4 +#define KEY_R 3 +#define KEY_T 2 +#define KEY_S 1 +#define KEY_E 16 +#define KEY_Y 15 +#define KEY_I 14 +#define KEY_O 13 +#define KEY_F_TOP 5 +#define KEY_F_BOTTOM 17 + +//////////////////////////////////////// +// Enable OLED +&pro_micro_i2c { + status = "okay"; +}; + +//////////////////////////////////////// +// Sticky / Leader Keys +#define TIMEOUT_STICKY_LEADER_KEY 5000 +&sk { + release-after-ms = ; +}; +&sl { + release-after-ms = ; +}; + +//////////////////////////////////////// +// LED Strip Tweak +&led_strip { + chain-length = <1>; +}; + +//////////////////////////////////////// +// Behaviors +/ { + behaviors { + tildeesc: tilde_escape { + compatible = "zmk,behavior-mod-morph"; + label = "tildeesc"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp TILDE>; + mods = <(MOD_LSFT)>; + }; + artsey: artsey { compatible = "zmk,behavior-hold-tap"; label = "artsey"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&tog>, <&kp>; }; + ht_mo_kp: ht_mo_kp { compatible = "zmk,behavior-hold-tap"; label = "ht_mo_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + ht_mo_kp: ht_mo_kp { compatible = "zmk,behavior-hold-tap"; label = "ht_mo_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + ht_kp_kp: ht_kp_kp { compatible = "zmk,behavior-hold-tap"; label = "ht_kp_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; }; + layer_base_kp: layer_base_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_base_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_numbers_kp: layer_numbers_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_numbers_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_symbols_kp: layer_symbols_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_symbols_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_parentheticals_kp: layer_parentheticals_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_parentheticals_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_custom_kp: layer_custom_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_custom_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + ctrl_alt_kp: ctrl_alt_kp { compatible = "zmk,behavior-hold-tap"; label = "ctrl_alt_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&sk>, <&sk>; }; + }; +}; + +//////////////////////////////////////// +// Combos +/ { + combos { + compatible = "zmk,combos"; + /***************************************** + * 2 key combos + *****************************************/ + // Function layer doesn't apply to non-big artsey presently + #if defined ARTSEY_BIG + combo_layer_functions { layers = ; key-positions = ; bindings = <&sl LAYER_ID_BIG_FUNCTION>; }; + #endif + combo_enter { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ENTER>; }; + combo_control { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk RCTRL>; }; + combo_gui { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LGUI>; }; + combo_alt { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LALT>; }; + combo_backspace { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp BACKSPACE>; }; + combo_delete { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp DELETE>; }; + combo_shift_lock { layers = ; timeout-ms = ; key-positions = ; bindings = <&kt LSHFT>; }; + + combo_b { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp B>; }; + combo_c { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp C>; }; + combo_n { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ARTSEY_COMBO_N>; }; + combo_f { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp F>; }; + combo_g { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp G>; }; + combo_u { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp U>; }; + combo_h { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp H>; }; + combo_v { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp V>; }; + combo_j { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp J>; }; + combo_w { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp W>; }; + combo_k { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp K>; }; + combo_comma { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp COMMA>; }; + combo_period { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp PERIOD>; }; + combo_slash { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SLASH>; }; + combo_exclamation { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp EXCL>; }; + + combo_seven { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N7>; }; + combo_eight { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N8>; }; + combo_nine { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N9>; }; + combo_zero { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N0>; }; + + /***************************************** + * 3 key combos + *****************************************/ + combo_esc { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ESC>; }; + combo_layer_navigation { layers = ; timeout-ms = ; key-positions = ; bindings = <&tog LAYER_ID_NAVIGATION>; }; + + combo_m { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp M>; }; + combo_d { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp D>; }; + combo_p { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp P>; }; + combo_q { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Q>; }; + combo_x { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp X>; }; + combo_l { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp L>; }; + combo_single_quote { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SQT>; }; + + /***************************************** + * 4 key combos + *****************************************/ + combo_tab { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp TAB>; }; + combo_space { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SPACE>; }; + combo_shift { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LSHFT>; }; + combo_layer_bt_select { layers = ; timeout-ms = ; key-positions = ; bindings = <&tog LAYER_ID_BT_SEL>; }; + combo_bt_clr { layers = ; timeout-ms = ; key-positions = ; bindings = <&bt BT_CLR>; }; + + combo_z { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Z>; }; + combo_caps_lock { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; + }; +}; + +//////////////////////////////////////// +// Keymap (main THEN artsey) +/ { + keymap { + compatible = "zmk,keymap"; + default_layer { + label = "ANSI"; + bindings = < +&tildeesc &layer_numbers_kp LAYER_ID_NUMBERS Q &kp W &kp E &layer_parentheticals_kp LAYER_ID_PARENTHETICALS R &artsey LAYER_ID_BASE T &artsey LAYER_ID_BASE Y &kp U &kp I &kp O &kp P &kp BSPC +&kp TAB &layer_custom_kp LAYER_ID_CUSTOM A &kp S &kp D &layer_symbols_kp LAYER_ID_SYMBOLS F &kp G &kp H &kp J &kp K &kp L &ht_kp_kp SQT SEMI &kp RET +&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &ht_kp_kp BSLH FSLH &kp RCTRL +&kp LGUI &mo LAYER_ID_BIG_SYM &kp SPACE &ht_mo_kp LAYER_ID_NAV SPACE &ht_mo_kp LAYER_ID_FUNC MINUS &ht_kp_kp AT EQUAL + >; + }; + + function_layer { + label = "Function"; + bindings = < +&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp DEL +&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp INSERT +&kp LALT &trans &trans &trans &trans &kp F11 &kp F12 &trans &trans &trans &trans &kp PSCRN +&trans &trans &trans &trans &trans &ext_power EP_TOG + >; + }; + + nav_layer { + label = "Nav"; + bindings = < +&trans &kp PG_UP &kp HOME &kp UP &kp END &trans &trans &trans &trans &trans &trans &trans +&kp LSHFT &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &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 + >; + }; + +artsey_base { + label = "*ARTSEY*"; + bindings = < +&none &layer_numbers_kp LAYER_ID_NUMBERS ARTSEY_BASE_S &kp ARTSEY_BASE_T &kp ARTSEY_BASE_R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS ARTSEY_BASE_A &artsey LAYER_ID_BASE MINUS &tog LAYER_ID_BASE &none &none &none &none &none +&none &layer_custom_kp LAYER_ID_CUSTOM ARTSEY_BASE_O &kp ARTSEY_BASE_I &kp ARTSEY_BASE_Y &layer_symbols_kp LAYER_ID_SYMBOLS ARTSEY_BASE_E &sk LSHFT &none &none &none &none &none &none +&none &ctrl_alt_kp LALT RCTRL &kp AT &kp DEL &kp EQUAL &kp TAB &none &none &none &none &none &none +&none &mo LAYER_ID_BIG_SYM &kp SPACE &trans &none &none + >; + }; + artsey_numbers { + label = "Number"; + bindings = < +&none &mo LAYER_ID_NUMBERS &kp N3 &kp N2 &kp N1 &none &none &none &none &none &none &none +&none &none &kp N6 &kp N5 &kp N4 &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + artsey_symbols { + label = "Symbol"; + bindings = < +&none &kp GRAVE &kp SEMI &kp BSLH &kp EXCL &none &none &none &none &none &none &none +&none &kp EQUAL &kp MINUS &kp QMARK &mo LAYER_ID_SYMBOLS &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + artsey_parentheticals { + label = "Paren"; + bindings = < +&none &kp LBRC &kp LPAR &kp RPAR &mo LAYER_ID_PARENTHETICALS &none &none &none &none &none &none &none +&none &kp RBRC &kp LBKT &kp RBKT &none &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + artsey_navigation { + label = "Nav"; + bindings = < +&none &kp PG_UP &kp HOME &kp UP &kp END &none &none &none &none &none &none &none +&none &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + artsey_bt { + label = "BT"; + bindings = < +&none ARTSEY_BT_TOP &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &none &none &none &none &none &none &none +&none ARTSEY_BT_BOTTOM &bt BT_SEL 5 &bt BT_SEL 4 &bt BT_SEL 3 &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + artsey_custom { + label = "Custom"; + bindings = < +&none &none &kp C_VOL_UP &kp INS &kp C_MUTE &none &none &none &none &none &none &none +&none &mo LAYER_ID_CUSTOM &kp C_VOL_DN &kp PSCRN &sk RSHFT &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + big_artsey_symbol { + label = "*Symbol*"; + bindings = < +&none &kp CARET &kp LBRC &kp RBRC &kp HASH &kp GRAVE &none &none &none &none &none &none +&none &kp AMPS &kp LPAR &kp RPAR &kp DLLR &kp BSLH &none &none &none &none &none &none +&none &kp ASTRK &kp LBKT &kp RBKT &kp PRCNT &kp PIPE &none &none &none &none &none &none +&none &none &kp SEMI &trans &none &none + >; + }; + big_artsey_function { + label = "*Func*"; + bindings = < +&none &kp F4 &kp F3 &kp F2 &kp F1 &none &none &none &none &none &none &none +&none &kp F8 &kp F7 &kp F6 &kp F5 &none &none &none &none &none &none &none +&none &kp F12 &kp F11 &kp F10 &kp F9 &none &none &none &none &none &none &none +&none &none &none &trans &none &none + >; + }; + }; +}; diff --git a/zmk-config/config/nibble.keymap b/zmk-config/config/nibble.keymap index 11fc17f4..ea7d7228 100644 --- a/zmk-config/config/nibble.keymap +++ b/zmk-config/config/nibble.keymap @@ -277,9 +277,335 @@ &trans &none &none &none &none &none &none &none &none &none &none >; }; + artsey_symbols { + label = "Symbol";/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + /***************************************** + * - YOU MUST SET THE FOLLOWING CONFIG VALUES FOR THIS SETUP TO WORK PROPERLY IN YOUR BOARDS .conf FILE + * - CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16 + * - CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8 + * - CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8 + *****************************************/ + +//////////////////////////////////////// +// Various includes +#include +#include +#include +#include +#include +#include + +//////////////////////////////////////// +// Layers +#define LAYER_ID_GLOBAL -1 +#define LAYER_ID_DEFAULT 0 +#define LAYER_ID_FUNC 1 +#define LAYER_ID_ALT 2 +#define LAYER_ID_BASE 3 +#define LAYER_ID_NUMBERS 4 +#define LAYER_ID_SYMBOLS 5 +#define LAYER_ID_PARENTHETICALS 6 +#define LAYER_ID_NAVIGATION 7 +#define LAYER_ID_BT_SEL 8 +#define LAYER_ID_CUSTOM 9 +#define LAYER_ID_BIG_SYM 10 +#define LAYER_ID_BIG_FUNCTION 11 +#define LAYERS_ARTSEY LAYER_ID_BASE LAYER_ID_NUMBERS LAYER_ID_SYMBOLS LAYER_ID_PARENTHETICALS LAYER_ID_NAVIGATION LAYER_ID_BT_SEL LAYER_ID_CUSTOM LAYER_ID_BIG_SYM LAYER_ID_BIG_FUNCTION + +//////////////////////////////////////// +// Artsey definitions +#define ARTSEY_BT_TOP &out OUT_BLE +#define ARTSEY_BT_BOTTOM &out OUT_USB +#define TIMEOUT_COMBO_2 150 +#define TIMEOUT_COMBO_3 150 +#define TIMEOUT_COMBO_4 150 +#define TIMEOUT_LAYER_HOLD 200 +#define ARTSEY_BASE_A A +#define ARTSEY_BASE_R R +#define ARTSEY_BASE_T T +#define ARTSEY_BASE_S S +#define ARTSEY_BASE_E E +#define ARTSEY_BASE_Y Y +#define ARTSEY_BASE_I I +#define ARTSEY_BASE_O O +#define ARTSEY_COMBO_N N +#define KEY_A 16 +#define KEY_R 15 +#define KEY_T 14 +#define KEY_S 13 +#define KEY_E 28 +#define KEY_Y 27 +#define KEY_I 26 +#define KEY_O 25 +#define KEY_F_TOP 17 +#define KEY_F_BOTTOM 29 + +//////////////////////////////////////// +// Enable OLED +&pro_micro_i2c { + status = "okay"; +}; + +//////////////////////////////////////// +// Sticky / Leader Keys +#define TIMEOUT_STICKY_LEADER_KEY 5000 +&sk { + release-after-ms = ; +}; +&sl { + release-after-ms = ; +}; + +//////////////////////////////////////// +// LED Strip Tweak +&led_strip { + chain-length = <1>; +}; + +//////////////////////////////////////// +// Behaviors +/ { + behaviors { + tildeesc: tilde_escape { + compatible = "zmk,behavior-mod-morph"; + label = "tildeesc"; + #binding-cells = <0>; + bindings = <&kp ESC>, <&kp TILDE>; + mods = <(MOD_LSFT)>; + }; + artsey: artsey { compatible = "zmk,behavior-hold-tap"; label = "artsey"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&tog>, <&kp>; }; + ht_mo_kp: ht_mo_kp { compatible = "zmk,behavior-hold-tap"; label = "ht_mo_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_base_kp: layer_base_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_base_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_numbers_kp: layer_numbers_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_numbers_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_symbols_kp: layer_symbols_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_symbols_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_parentheticals_kp: layer_parentheticals_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_parentheticals_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + layer_custom_kp: layer_custom_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_custom_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&mo>, <&kp>; }; + ctrl_alt_kp: ctrl_alt_kp { compatible = "zmk,behavior-hold-tap"; label = "ctrl_alt_kp"; + #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; + bindings = <&sk>, <&sk>; }; + }; +}; + +//////////////////////////////////////// +// Combos +/ { + combos { + compatible = "zmk,combos"; + /***************************************** + * 2 key combos + *****************************************/ + // Function layer doesn't apply to non-big artsey presently + #if defined ARTSEY_BIG + combo_layer_functions { key-positions = ; bindings = <&sl LAYER_ID_BIG_FUNCTION>; }; + #endif + combo_enter { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ENTER>; }; + combo_control { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk RCTRL>; }; + combo_gui { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LGUI>; }; + combo_alt { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LALT>; }; + combo_backspace { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp BACKSPACE>; }; + combo_delete { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp DELETE>; }; + combo_shift_lock { layers = ; timeout-ms = ; key-positions = ; bindings = <&kt LSHFT>; }; + + combo_b { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp B>; }; + combo_c { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp C>; }; + combo_n { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ARTSEY_COMBO_N>; }; + combo_f { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp F>; }; + combo_g { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp G>; }; + combo_u { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp U>; }; + combo_h { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp H>; }; + combo_v { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp V>; }; + combo_j { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp J>; }; + combo_w { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp W>; }; + combo_k { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp K>; }; + combo_comma { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp COMMA>; }; + combo_period { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp PERIOD>; }; + combo_slash { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SLASH>; }; + combo_exclamation { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp EXCL>; }; + + combo_seven { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N7>; }; + combo_eight { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N8>; }; + combo_nine { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N9>; }; + combo_zero { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N0>; }; + + /***************************************** + * 3 key combos + *****************************************/ + combo_esc { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp ESC>; }; + combo_layer_navigation { layers = ; timeout-ms = ; key-positions = ; bindings = <&tog LAYER_ID_NAVIGATION>; }; + + combo_m { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp M>; }; + combo_d { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp D>; }; + combo_p { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp P>; }; + combo_q { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Q>; }; + combo_x { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp X>; }; + combo_l { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp L>; }; + combo_single_quote { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SQT>; }; + + /***************************************** + * 4 key combos + *****************************************/ + combo_tab { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp TAB>; }; + combo_space { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SPACE>; }; + combo_shift { layers = ; timeout-ms = ; key-positions = ; bindings = <&sk LSHFT>; }; + combo_layer_bt_select { layers = ; timeout-ms = ; key-positions = ; bindings = <&tog LAYER_ID_BT_SEL>; }; + combo_bt_clr { layers = ; timeout-ms = ; key-positions = ; bindings = <&bt BT_CLR>; }; + + combo_z { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Z>; }; + combo_caps_lock { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; + }; +}; + +//////////////////////////////////////// +// Keymap (main THEN artsey) +/ { + keymap { + compatible = "zmk,keymap"; + default_layer { + label = "ANSI"; + bindings = < +&tildeesc &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSLH +&kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp RET +&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &artsey LAYER_ID_BASE LBKT &kp RBKT &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp SQT + &kp LGUI &kp LALT &ht_mo_kp LAYER_ID_ALT MINUS &kp SPACE &kp SPACE &mo LAYER_ID_FUNC &kp EQUAL &kp RCTRL + >; + }; + + function_layer { + label = "Function"; + bindings = < +&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp DEL +&trans &kp PG_UP &kp HOME &kp UP &kp END &kp F11 &kp F12 &trans &trans &trans &trans &kp DEL +&trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp INSERT +&trans &trans &trans &trans &trans &trans &trans &ext_power EP_TOG &trans &trans &trans &trans &trans &kp PSCRN + &trans &trans &trans &trans &trans &mo LAYER_ID_FUNC &kp C_MUTE &kp C_PLAY_PAUSE + >; + }; + + alt_layer { + label = "Alt"; + bindings = < +&kp LA(F1) &kp LA(F2) &kp LA(F3) &kp LA(F4) &kp LA(F5) &kp LA(F6) &kp LA(F7) &kp LA(F8) &kp LA(F9) &kp LA(F10) &kp LA(F11) &kp LA(F12) +&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 &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + +artsey_base { + label = "*ARTSEY*"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &layer_numbers_kp LAYER_ID_NUMBERS ARTSEY_BASE_S &kp ARTSEY_BASE_T &kp ARTSEY_BASE_R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS ARTSEY_BASE_A &kp MINUS &none &none &none &none &none &none +&none &layer_custom_kp LAYER_ID_CUSTOM ARTSEY_BASE_O &kp ARTSEY_BASE_I &kp ARTSEY_BASE_Y &layer_symbols_kp LAYER_ID_SYMBOLS ARTSEY_BASE_E &sk LSHFT &none &none &none &none &none &none +&none &ctrl_alt_kp LALT RCTRL &kp AT &kp DEL &kp EQUAL &kp TAB &tog LAYER_ID_BASE &none &none &none &none &none &none &none + &none &mo LAYER_ID_BIG_SYM &kp SPACE &none &none &none &none + >; + }; + artsey_numbers { + label = "Number"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &mo LAYER_ID_NUMBERS &kp N3 &kp N2 &kp N1 &none &none &none &none &none &none &none +&none &none &kp N6 &kp N5 &kp N4 &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; artsey_symbols { label = "Symbol"; bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &kp GRAVE &kp SEMI &kp BSLH &kp EXCL &none &none &none &none &none &none &none +&none &kp EQUAL &kp MINUS &kp QMARK &mo LAYER_ID_SYMBOLS &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + artsey_parentheticals { + label = "Paren"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &kp LBRC &kp LPAR &kp RPAR &mo LAYER_ID_PARENTHETICALS &none &none &none &none &none &none &none +&none &kp RBRC &kp LBKT &kp RBKT &none &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + artsey_navigation { + label = "Nav"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &kp PG_UP &kp HOME &kp UP &kp END &none &none &none &none &none &none &none +&none &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + artsey_bt { + label = "BT"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none ARTSEY_BT_TOP &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &none &none &none &none &none &none &none +&none ARTSEY_BT_BOTTOM &bt BT_SEL 5 &bt BT_SEL 4 &bt BT_SEL 3 &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + artsey_custom { + label = "Custom"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &none &kp C_VOL_UP &kp INS &kp C_MUTE &none &none &none &none &none &none &none +&none &mo LAYER_ID_CUSTOM &kp C_VOL_DN &kp PSCRN &sk RSHFT &none &none &none &none &none &none &none +&none &none &none &none &none &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + big_artsey_symbol { + label = "*Symbol*"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &kp CARET &kp LBRC &kp RBRC &kp HASH &kp GRAVE &none &none &none &none &none &none +&none &kp AMPS &kp LPAR &kp RPAR &kp DLLR &kp BSLH &none &none &none &none &none &none +&none &kp ASTRK &kp LBKT &kp RBKT &kp PRCNT &kp PIPE &none &none &none &none &none &none &none &none + &none &none &kp SEMI &none &none &none &none &none + >; + }; + big_artsey_function { + label = "*Func*"; + bindings = < +&none &none &none &none &none &none &none &none &none &none &none &none +&none &kp F4 &kp F3 &kp F2 &kp F1 &none &none &none &none &none &none &none +&none &kp F8 &kp F7 &kp F6 &kp F5 &none &none &none &none &none &none &none +&none &kp F12 &kp F11 &kp F10 &kp F9 &none &none &none &none &none &none &none &none &none + &none &none &none &none &none &none &none &none + >; + }; + }; +}; + + bindings = < &none &none &none &none &none &none &none &none &none &none &none &none &none &none &none &trans &none &kp GRAVE &kp SEMI &kp BSLH &kp EXCL &none &none &none &none &none &none &none &none &none &none &trans &none &kp EQUAL &kp MINUS &kp QMARK &mo LAYER_ID_SYMBOLS &none &none &none &none &none &none &none &none &none