/* * Copyright (c) 2020 The ZMK Contributors * * SPDX-License-Identifier: MIT */ #include #include /***************************************** * ARTSEY website : https://www.artsey.io * Primary reference : https://www.artsey.io/_FILES/images/ARTSEY.jpg *****************************************/ /***************************************** * Setting up ARTSEY chording * - Please note: A/E key positions should be on your INDEX finger * - The online reference is for right handed use * - When using the ARTSEY layout left handed you'll want to ensure your keypositions are flipped along the Y axis * - Update/adjust the key positions using your boards keymap * - See below for additional details * - Adjust your boards keymap layers... * - To have the SAME layers defined as this keymap * - Take the commented layers from below and place the values into your boards keymap in 'the right spots' * - YOU MUST SET THE FOLLOWING CONFIG VALUES FOR THIS SETUP TO WORK PROPERLY * - CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=16 * - CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=8 * - CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=8 *****************************************/ /***************************************** * Define key positions used for chording * These definitions are used to define the various ARTSEY chords (combos) * * Please see the documentation on "combos" for details on how to find the proper key positions * * Default key positions are for a generic 4x2 keyboard and should NOT be used outright * DEFINE these definitions in your boards keymap BEFORE including artsey.dtsi *****************************************/ // ARTS Row // #define KEY_A 0 // #define KEY_R 1 // #define KEY_T 2 // #define KEY_S 3 // EYIO Row // #define KEY_E 4 // #define KEY_Y 5 // #define KEY_I 6 // #define KEY_O 7 /***************************************** * Layer IDs used by the ARTSEY keymap * Do NOT change these and do NOT change the order of the layers as shown below *****************************************/ #define LAYER_ID_BASE 0 #define LAYER_ID_NUMBERS 1 #define LAYER_ID_SYMBOLS 2 #define LAYER_ID_PARENTHETICALS 3 #define LAYER_ID_NAVIGATION 4 #define LAYER_ID_F_ONE_SIX 5 #define LAYER_ID_F_SEVEN_TWELVE 6 #define LAYER_ID_MOUSE 7 /***************************************** * Define how long it takes for the chords/holds to 'time out' * See documentation on "combos" for more detail *****************************************/ #define TIMEOUT_CHORD 125 #define TIMEOUT_LAYER_HOLD 250 &sk { release-after-ms = <1000>; }; &sl { release-after-ms = <2000>; }; /***************************************** * Standard ARTSEY chord definitions * These should NOT be changed and are global in scope *****************************************/ / { combos { compatible = "zmk,combos"; chord_b { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp B>; }; chord_m { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp M>; }; chord_c { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp C>; }; chord_n { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N>; }; chord_d { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp D>; }; chord_p { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp P>; }; chord_f { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp F>; }; chord_q { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Q>; }; chord_g { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp G>; }; chord_u { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp U>; }; chord_h { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp H>; }; chord_v { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp V>; }; chord_j { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp J>; }; chord_w { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp W>; }; chord_k { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp K>; }; chord_x { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp X>; }; chord_l { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp L>; }; chord_z { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Z>; }; chord_enter { timeout-ms = ; key-positions = ; bindings = <&kp ENTER>; }; chord_esc { timeout-ms = ; key-positions = ; bindings = <&kp ESC>; }; chord_single_quote { timeout-ms = ; key-positions = ; bindings = <&kp SQT>; }; chord_tab { timeout-ms = ; key-positions = ; bindings = <&kp TAB>; }; chord_dot { timeout-ms = ; key-positions = ; bindings = <&kp PERIOD>; }; chord_control { timeout-ms = ; key-positions = ; bindings = <&sk LCTRL>; }; chord_comma { timeout-ms = ; key-positions = ; bindings = <&kp COMMA>; }; chord_gui { timeout-ms = ; key-positions = ; bindings = <&sk LGUI>; }; chord_slash { timeout-ms = ; key-positions = ; bindings = <&kp SLASH>; }; chord_alt { timeout-ms = ; key-positions = ; bindings = <&sk LALT>; }; chord_backspace { timeout-ms = ; key-positions = ; bindings = <&kp BACKSPACE>; }; chord_shift { timeout-ms = ; key-positions = ; bindings = <&sk LSHFT>; }; chord_space { timeout-ms = ; key-positions = ; bindings = <&kp SPACE>; }; chord_shift_lock { timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; chord_seven { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N7>; }; chord_eight { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N8>; }; chord_nine { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N9>; }; chord_zero { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp N0>; }; /* TODO: Setup/Enable once Mouse Keys feature(s) are added to ZMK */ //chord_mouse { timeout-ms = ; key-positions = ; bindings = <&none>; }; }; }; /***************************************** * Standard ARTSEY layer activation definitions * These should NOT be changed and are global in scope *****************************************/ / { behaviors { layer_base_none: layer_base_none { compatible = "zmk,behavior-hold-tap"; label = "layer_base_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&to>, <&none>; }; 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 = <&to>, <&kp>; }; layer_base_sl: layer_base_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_base_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&sl>; }; layer_numbers_none: layer_numbers_none { compatible = "zmk,behavior-hold-tap"; label = "layer_numbers_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&to>, <&none>; }; 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 = <&to>, <&kp>; }; layer_numbers_sl: layer_numbers_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_numbers_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&sl>; }; layer_symbols_none: layer_symbols_none { compatible = "zmk,behavior-hold-tap"; label = "layer_symbols_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&to>, <&none>; }; 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 = <&to>, <&kp>; }; layer_symbols_sl: layer_symbols_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_symbols_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&sl>; }; layer_parentheticals_none: layer_parentheticals_none { compatible = "zmk,behavior-hold-tap"; label = "layer_parentheticals_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&to>, <&none>; }; 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 = <&to>, <&kp>; }; layer_parentheticals_sl: layer_parentheticals_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_parentheticals_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&sl>; }; layer_navigation_none: layer_navigation_none { compatible = "zmk,behavior-hold-tap"; label = "layer_navigation_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&to>, <&none>; }; layer_navigation_kp: layer_navigation_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_navigation_kp"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&kp>; }; layer_navigation_sl: layer_navigation_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_navigation_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&to>, <&sl>; }; layer_mouse_none: layer_mouse_none { compatible = "zmk,behavior-hold-tap"; label = "layer_mouse_none"; #binding-cells = <2>; tapping_term_ms = ; flavor = "hold-preferred"; bindings = <&tog>, <&none>; }; layer_mouse_kp: layer_mouse_kp { compatible = "zmk,behavior-hold-tap"; label = "layer_mouse_kp"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&tog>, <&kp>; }; layer_mouse_sl: layer_mouse_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_mouse_sl"; #binding-cells = <2>; tapping_term_ms = ; flavor = "tap-preferred"; bindings = <&tog>, <&sl>; }; }; }; /***************************************** * Standard ARTSEY layer definitions !!!!!!!!!! FOR RIGHT HANDED USE !!!!!!!!!! * These SHOULD BE CHANGED and adjusted according to your boards transform * Use "&none" to fill in gaps * This section is commented to avoid conflicts with downstream board definitions *****************************************/ // / { // keymap { // compatible = "zmk,keymap"; // base { // label = "ARTSEY"; // bindings = < // &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A &kp R &kp T &layer_numbers_kp LAYER_ID_NUMBERS S // &layer_symbols_kp LAYER_ID_SYMBOLS E &kp Y &kp I &layer_navigation_kp LAYER_ID_NAVIGATION O // >; // }; // numbers { // label = "Number"; // bindings = < /* TODO: NEED TO SETUP Fn LEADER KEY(S) */ // &layer_parentheticals_kp LAYER_ID_PARENTHETICALS N1 &kp N2 &kp N3 &layer_base_sl LAYER_ID_BASE LAYER_ID_F_ONE_SIX // &layer_symbols_kp LAYER_ID_SYMBOLS N4 &kp N5 &kp N6 &layer_navigation_sl LAYER_ID_NAVIGATION LAYER_ID_F_SEVEN_TWELVE // >; // }; // symbols { // label = "Symbol"; // bindings = < // &layer_parentheticals_none LAYER_ID_PARENTHETICALS 0 &kp BSLH &kp SEMI &layer_numbers_kp LAYER_ID_NUMBERS GRAVE // &layer_base_none LAYER_ID_BASE 0 &kp MINUS &kp EQUAL &layer_navigation_none LAYER_ID_NAVIGATION 0 // >; // }; // parentheticals { // label = "Paren"; // bindings = < // &layer_base_none LAYER_ID_BASE 0 &kp LPAR &kp RPAR &layer_numbers_kp LAYER_ID_NUMBERS LBRC // &layer_symbols_none LAYER_ID_SYMBOLS 0 &kp LBKT &kp RBKT &layer_navigation_kp LAYER_ID_NAVIGATION RBRC // >; // }; // navigation { // label = "Nav"; // bindings = < // &layer_parentheticals_kp LAYER_ID_PARENTHETICALS HOME &kp UP &kp END &layer_numbers_none LAYER_ID_NUMBERS PG_UP // &layer_symbols_kp LAYER_ID_SYMBOLS LEFT &kp DOWN &kp RIGHT &layer_base_none LAYER_ID_BASE PG_DN // >; // }; // f_one_to_six{ // label = "F1-F6"; // bindings = < // &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F1 &kp F2 &kp F3 &layer_numbers_none LAYER_ID_NUMBERS 0 // &layer_symbols_kp LAYER_ID_SYMBOLS F4 &kp F5 &kp F6 &layer_navigation_none LAYER_ID_NAVIGATION 0 // >; // }; // f_seven_to_twelve { // label = "F7-F12"; // bindings = < // &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F7 &kp F8 &kp F9 &layer_numbers_none LAYER_ID_NUMBERS 0 // &layer_symbols_kp LAYER_ID_SYMBOLS F10 &kp N11 &kp F12 &layer_navigation_none LAYER_ID_NAVIGATION 0 // >; // }; // mouse { /* TODO: Not implemented yet, needs mouse keys in upstream */ // label = "Mouse"; // bindings = < // &none &none &none &none // &none &none &none &none // >; // }; // }; /***************************************** * Standard ARTSEY layer definitions !!!!!!!!!! FOR LEFT HANDED USE !!!!!!!!!! * These SHOULD BE CHANGED and adjusted according to your boards transform * Use "&none" to fill in gaps * This section is commented to avoid conflicts with downstream board definitions *****************************************/ // / { // keymap { // compatible = "zmk,keymap"; // base { // label = "ARTSEY"; // bindings = < // &layer_numbers_kp LAYER_ID_NUMBERS S &kp T &kp R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A // &layer_navigation_kp LAYER_ID_NAVIGATION O &kp I &kp Y &layer_symbols_kp LAYER_ID_SYMBOLS E // >; // }; // numbers { // label = "Number"; // bindings = < // &layer_base_sl LAYER_ID_BASE LAYER_ID_F_ONE_SIX &kp N3 &kp N2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS N1 // &layer_navigation_sl LAYER_ID_NAVIGATION LAYER_ID_F_SEVEN_TWELVE &kp N6 &kp N5 &layer_symbols_kp LAYER_ID_SYMBOLS N4 // >; // }; // symbols { // label = "Symbol"; // bindings = < // &layer_numbers_kp LAYER_ID_NUMBERS GRAVE &kp SEMI &kp BSLH &layer_parentheticals_none LAYER_ID_PARENTHETICALS 0 // &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp EQUAL &kp MINUS &layer_base_none LAYER_ID_BASE 0 // >; // }; // parentheticals { // label = "Paren"; // bindings = < // &layer_numbers_kp LAYER_ID_NUMBERS LBRC &kp LPAR &kp RPAR &layer_base_none LAYER_ID_BASE 0 // &layer_navigation_kp LAYER_ID_NAVIGATION RBRC &kp LBKT &kp RBKT &layer_symbols_none LAYER_ID_SYMBOLS 0 // >; // }; // navigation { // label = "Nav"; // bindings = < // &layer_numbers_kp LAYER_ID_NUMBERS PG_UP &kp HOME &kp UP &layer_parentheticals_kp LAYER_ID_PARENTHETICALS END // &layer_base_kp LAYER_ID_BASE PG_DN &kp LEFT &kp DOWN &layer_symbols_kp LAYER_ID_SYMBOLS RIGHT // >; // }; // f_one_to_six{ // label = "F1-F6"; // bindings = < // &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F3 &kp F2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F1 // &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F6 &kp F5 &layer_symbols_kp LAYER_ID_SYMBOLS F4 // >; // }; // f_seven_to_twelve { // label = "F7-F12"; // bindings = < // &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F9 &kp F8 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F7 // &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F12 &kp F11 &layer_symbols_kp LAYER_ID_SYMBOLS F10 // >; // }; // }; // };