diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3b78e3..ab33a04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,9 @@ jobs: - board: nice_nano shield: corne_artsey_right - board: nice_nano - shield: the_paintbrush + shield: the_paintbrush_left + - board: nice_nano + shield: the_paintbrush_right - board: nice_nano shield: corne_5_col_artsey_left - board: nice_nano diff --git a/config/artsey.dtsi b/config/artsey.dtsi index 61da0ef..e3746b9 100644 --- a/config/artsey.dtsi +++ b/config/artsey.dtsi @@ -79,10 +79,45 @@ * In order to make this keymap flexible, you must setup the number of &none "offsets" to use * The defines below should be set in your LOCAL keymap and using the above "NONE([hundreds],[tens],[ones])" macro for filling in the gaps *****************************************/ -// #define LEADING_NONES NONE(0,1,0) +// #define LEADING_NONES NONE(0, 1, 0) // #define MIDDLE_NONES NONE(0, 0, 3) // #define TRAILING_NONES NONE(0, 1, 0) +/***************************************** + * Define custom layer + * + * You can override this layer by copy/pasting the into your keymap *before* including the artsey.dtsi file + * Once added to your keymap you can adjust as you see fit +*****************************************/ +#if !defined ARTSEY_LAYER_CUSTOM +#if defined ARTSEY_RIGHT +#define ARTSEY_LAYER_CUSTOM \ + custom { \ + label = "Custom"; \ + bindings = < \ + LEADING_NONES \ + &kp C_MUTE &kp INS &kp C_VOL_UP &none \ + MIDDLE_NONES \ + &sk RSHFT &kp PSCRN &kp C_VOL_DN &mo LAYER_ID_CUSTOM \ + TRAILING_NONES \ + >; \ + }; +#endif +#if defined ARTSEY_LEFT +#define ARTSEY_LAYER_CUSTOM \ + custom { \ + label = "Custom"; \ + bindings = < \ + LEADING_NONES \ + &none &kp C_VOL_UP &kp INS &kp C_MUTE \ + MIDDLE_NONES \ + &mo LAYER_ID_CUSTOM &kp C_VOL_DN &kp PSCRN &sk RSHFT \ + TRAILING_NONES \ + >; \ + }; +#endif +#endif + /***************************************** * Layer IDs used by the ARTSEY keymap * Do NOT change these and do NOT change the order of the layers as shown below @@ -92,22 +127,22 @@ #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 LAYER_ID_CUSTOM 5 +#define LAYER_ID_MOUSE 6 /***************************************** * Define how long it takes for the combos/holds to 'time out' * See documentation on "combos" for more detail *****************************************/ +#if !defined TIMEOUT_COMBO #define TIMEOUT_COMBO 250 +#endif +#if !defined TIMEOUT_LAYER_HOLD #define TIMEOUT_LAYER_HOLD 500 +#endif &sk { release-after-ms = <1000>; }; -&sl { - release-after-ms = <2000>; -}; /***************************************** * Standard ARTSEY combo definitions @@ -136,22 +171,27 @@ combo_z { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp Z>; }; combo_enter { timeout-ms = ; key-positions = ; bindings = <&kp ENTER>; }; combo_esc { timeout-ms = ; key-positions = ; bindings = <&kp ESC>; }; - combo_single_quote { timeout-ms = ; key-positions = ; bindings = <&kp SQT>; }; + combo_single_quote { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SQT>; }; combo_tab { timeout-ms = ; key-positions = ; bindings = <&kp TAB>; }; - combo_dot { timeout-ms = ; key-positions = ; bindings = <&kp PERIOD>; }; + combo_dot { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp PERIOD>; }; combo_control { timeout-ms = ; key-positions = ; bindings = <&sk LCTRL>; }; - combo_comma { timeout-ms = ; key-positions = ; bindings = <&kp COMMA>; }; + combo_comma { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp COMMA>; }; combo_gui { timeout-ms = ; key-positions = ; bindings = <&sk LGUI>; }; - combo_slash { timeout-ms = ; key-positions = ; bindings = <&kp SLASH>; }; + combo_slash { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp SLASH>; }; combo_alt { timeout-ms = ; key-positions = ; bindings = <&sk LALT>; }; + combo_exclamation { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp EXCL>; }; combo_backspace { timeout-ms = ; key-positions = ; bindings = <&kp BACKSPACE>; }; combo_shift { timeout-ms = ; key-positions = ; bindings = <&sk LSHFT>; }; combo_space { timeout-ms = ; key-positions = ; bindings = <&kp SPACE>; }; - combo_shift_lock { timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; + combo_shift_lock { timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; + combo_caps_lock { layers = ; timeout-ms = ; key-positions = ; bindings = <&kp CAPS>; }; 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>; }; + combo_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; + combo_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; + combo_layer_navigation { key-positions = ; bindings = <&tog LAYER_ID_NAVIGATION>; }; /* TODO: Setup/Enable once Mouse Keys feature(s) are added to ZMK */ //combo_mouse { timeout-ms = ; key-positions = ; bindings = <&none>; }; }; @@ -163,60 +203,24 @@ *****************************************/ / { 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>; }; + 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 = <&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>; }; + 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 = <&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>; }; + 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 = <&to>, <&kp>; }; - layer_parentheticals_sl: layer_parentheticals_sl { compatible = "zmk,behavior-hold-tap"; label = "layer_parentheticals_sl"; + 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 = <&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>; }; + bindings = <&mo>, <&kp>; }; 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>; }; + bindings = <&mo>, <&kp>; }; }; }; @@ -232,9 +236,9 @@ label = "ARTSEY"; bindings = < LEADING_NONES - &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A &kp R &kp T &layer_numbers_kp LAYER_ID_NUMBERS S + &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A &kp R &kp T &layer_numbers_kp LAYER_ID_NUMBERS S MIDDLE_NONES - &layer_symbols_kp LAYER_ID_SYMBOLS E &kp Y &kp I &layer_navigation_kp LAYER_ID_NAVIGATION O + &layer_symbols_kp LAYER_ID_SYMBOLS E &kp Y &kp I &layer_custom_kp LAYER_ID_CUSTOM O TRAILING_NONES >; }; @@ -242,9 +246,9 @@ label = "Number"; bindings = < LEADING_NONES - &layer_parentheticals_kp LAYER_ID_PARENTHETICALS N1 &kp N2 &kp N3 &layer_base_sl LAYER_ID_BASE LAYER_ID_F_ONE_SIX + &kp N1 &kp N2 &kp N3 &mo LAYER_ID_NUMBERS MIDDLE_NONES - &layer_symbols_kp LAYER_ID_SYMBOLS N4 &kp N5 &kp N6 &layer_navigation_sl LAYER_ID_NAVIGATION LAYER_ID_F_SEVEN_TWELVE + &kp N4 &kp N5 &kp N6 &none TRAILING_NONES >; }; @@ -252,9 +256,9 @@ label = "Symbol"; bindings = < LEADING_NONES - &layer_parentheticals_none LAYER_ID_PARENTHETICALS 0 &kp BSLH &kp SEMI &layer_numbers_kp LAYER_ID_NUMBERS GRAVE + &kp EXCL &kp BSLH &kp SEMI &kp GRAVE MIDDLE_NONES - &layer_base_none LAYER_ID_BASE 0 &kp MINUS &kp EQUAL &layer_navigation_none LAYER_ID_NAVIGATION 0 + &mo LAYER_ID_SYMBOLS &kp QMARK &kp MINUS &kp EQUAL TRAILING_NONES >; }; @@ -262,9 +266,9 @@ label = "Paren"; bindings = < LEADING_NONES - &layer_base_none LAYER_ID_BASE 0 &kp LPAR &kp RPAR &layer_numbers_kp LAYER_ID_NUMBERS LBRC + &mo LAYER_ID_PARENTHETICALS &kp LPAR &kp RPAR &kp LBRC MIDDLE_NONES - &layer_symbols_none LAYER_ID_SYMBOLS 0 &kp LBKT &kp RBKT &layer_navigation_kp LAYER_ID_NAVIGATION RBRC + &none &kp LBKT &kp RBKT &kp RBRC TRAILING_NONES >; }; @@ -272,32 +276,13 @@ label = "Nav"; bindings = < LEADING_NONES - &layer_parentheticals_kp LAYER_ID_PARENTHETICALS HOME &kp UP &kp END &layer_numbers_none LAYER_ID_NUMBERS PG_UP + &kp HOME &kp UP &kp END &kp PG_UP MIDDLE_NONES - &layer_symbols_kp LAYER_ID_SYMBOLS LEFT &kp DOWN &kp RIGHT &layer_base_none LAYER_ID_BASE PG_DN - TRAILING_NONES - >; - }; - f_one_to_six{ - label = "F1-F6"; - bindings = < - LEADING_NONES - &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F1 &kp F2 &kp F3 &layer_numbers_none LAYER_ID_NUMBERS 0 - MIDDLE_NONES - &layer_symbols_kp LAYER_ID_SYMBOLS F4 &kp F5 &kp F6 &layer_navigation_none LAYER_ID_NAVIGATION 0 - TRAILING_NONES - >; - }; - f_seven_to_twelve { - label = "F7-F12"; - bindings = < - LEADING_NONES - &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F7 &kp F8 &kp F9 &layer_numbers_none LAYER_ID_NUMBERS 0 - MIDDLE_NONES - &layer_symbols_kp LAYER_ID_SYMBOLS F10 &kp F11 &kp F12 &layer_navigation_none LAYER_ID_NAVIGATION 0 + &kp LEFT &kp DOWN &kp RIGHT &kp PG_DN TRAILING_NONES >; }; + ARTSEY_LAYER_CUSTOM // mouse { /* TODO: Not implemented yet, needs mouse keys in upstream */ // label = "Mouse"; // bindings = < @@ -321,9 +306,9 @@ label = "ARTSEY"; bindings = < LEADING_NONES - &layer_numbers_kp LAYER_ID_NUMBERS S &kp T &kp R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A + &layer_numbers_kp LAYER_ID_NUMBERS S &kp T &kp R &layer_parentheticals_kp LAYER_ID_PARENTHETICALS A MIDDLE_NONES - &layer_navigation_kp LAYER_ID_NAVIGATION O &kp I &kp Y &layer_symbols_kp LAYER_ID_SYMBOLS E + &layer_custom_kp LAYER_ID_CUSTOM O &kp I &kp Y &layer_symbols_kp LAYER_ID_SYMBOLS E TRAILING_NONES >; }; @@ -331,9 +316,9 @@ label = "Number"; bindings = < LEADING_NONES - &layer_base_sl LAYER_ID_BASE LAYER_ID_F_ONE_SIX &kp N3 &kp N2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS N1 + &mo LAYER_ID_NUMBERS &kp N3 &kp N2 &kp N1 MIDDLE_NONES - &layer_navigation_sl LAYER_ID_NAVIGATION LAYER_ID_F_SEVEN_TWELVE &kp N6 &kp N5 &layer_symbols_kp LAYER_ID_SYMBOLS N4 + &none &kp N6 &kp N5 &kp N4 TRAILING_NONES >; }; @@ -341,9 +326,9 @@ label = "Symbol"; bindings = < LEADING_NONES - &layer_numbers_kp LAYER_ID_NUMBERS GRAVE &kp SEMI &kp BSLH &layer_parentheticals_none LAYER_ID_PARENTHETICALS 0 + &kp GRAVE &kp SEMI &kp BSLH &kp EXCL MIDDLE_NONES - &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp EQUAL &kp MINUS &layer_base_none LAYER_ID_BASE 0 + &kp EQUAL &kp MINUS &kp QMARK &mo LAYER_ID_SYMBOLS TRAILING_NONES >; }; @@ -351,9 +336,9 @@ label = "Paren"; bindings = < LEADING_NONES - &layer_numbers_kp LAYER_ID_NUMBERS LBRC &kp LPAR &kp RPAR &layer_base_none LAYER_ID_BASE 0 + &kp LBRC &kp LPAR &kp RPAR &mo LAYER_ID_PARENTHETICALS MIDDLE_NONES - &layer_navigation_kp LAYER_ID_NAVIGATION RBRC &kp LBKT &kp RBKT &layer_symbols_none LAYER_ID_SYMBOLS 0 + &kp RBRC &kp LBKT &kp RBKT &none TRAILING_NONES >; }; @@ -361,32 +346,13 @@ label = "Nav"; bindings = < LEADING_NONES - &layer_numbers_kp LAYER_ID_NUMBERS PG_UP &kp HOME &kp UP &layer_parentheticals_kp LAYER_ID_PARENTHETICALS END + &kp PG_UP &kp HOME &kp UP &kp END MIDDLE_NONES - &layer_base_kp LAYER_ID_BASE PG_DN &kp LEFT &kp DOWN &layer_symbols_kp LAYER_ID_SYMBOLS RIGHT - TRAILING_NONES - >; - }; - f_one_to_six{ - label = "F1-F6"; - bindings = < - LEADING_NONES - &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F3 &kp F2 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F1 - MIDDLE_NONES - &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F6 &kp F5 &layer_symbols_kp LAYER_ID_SYMBOLS F4 - TRAILING_NONES - >; - }; - f_seven_to_twelve { - label = "F7-F12"; - bindings = < - LEADING_NONES - &layer_numbers_none LAYER_ID_NUMBERS 0 &kp F9 &kp F8 &layer_parentheticals_kp LAYER_ID_PARENTHETICALS F7 - MIDDLE_NONES - &layer_navigation_none LAYER_ID_NAVIGATION 0 &kp F12 &kp F11 &layer_symbols_kp LAYER_ID_SYMBOLS F10 + &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT TRAILING_NONES >; }; + ARTSEY_LAYER_CUSTOM // mouse { /* TODO: Not implemented yet, needs mouse keys in upstream */ // label = "Mouse"; // bindings = < diff --git a/config/boards/shields/corne_left/corne_5_col_artsey_left.keymap b/config/boards/shields/corne_left/corne_5_col_artsey_left.keymap index 7c38bf7..b6a793d 100644 --- a/config/boards/shields/corne_left/corne_5_col_artsey_left.keymap +++ b/config/boards/shields/corne_left/corne_5_col_artsey_left.keymap @@ -34,12 +34,3 @@ // Include main artsey.io keymap #include "../../../artsey.dtsi" - -/ { - combos { - compatible = "zmk,combos"; - chord_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; - chord_bt_prv { key-positions = ; bindings = <&bt BT_PRV>; }; - chord_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; - }; -}; diff --git a/config/boards/shields/corne_left/corne_artsey_left.keymap b/config/boards/shields/corne_left/corne_artsey_left.keymap index afa320f..6b173c2 100644 --- a/config/boards/shields/corne_left/corne_artsey_left.keymap +++ b/config/boards/shields/corne_left/corne_artsey_left.keymap @@ -34,12 +34,3 @@ // Include main artsey.io keymap #include "../../../artsey.dtsi" - -/ { - combos { - compatible = "zmk,combos"; - chord_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; - chord_bt_prv { key-positions = ; bindings = <&bt BT_PRV>; }; - chord_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; - }; -}; diff --git a/config/boards/shields/corne_right/corne_5_col_artsey_right.keymap b/config/boards/shields/corne_right/corne_5_col_artsey_right.keymap index 7fec9ac..5ab17dd 100644 --- a/config/boards/shields/corne_right/corne_5_col_artsey_right.keymap +++ b/config/boards/shields/corne_right/corne_5_col_artsey_right.keymap @@ -34,12 +34,3 @@ // Include main artsey.io keymap #include "../../../artsey.dtsi" - -/ { - combos { - compatible = "zmk,combos"; - chord_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; - chord_bt_prv { key-positions = ; bindings = <&bt BT_PRV>; }; - chord_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; - }; -}; diff --git a/config/boards/shields/corne_right/corne_artsey_right.keymap b/config/boards/shields/corne_right/corne_artsey_right.keymap index c8685d4..4ee3d1a 100644 --- a/config/boards/shields/corne_right/corne_artsey_right.keymap +++ b/config/boards/shields/corne_right/corne_artsey_right.keymap @@ -34,12 +34,3 @@ // Include main artsey.io keymap #include "../../../artsey.dtsi" - -/ { - combos { - compatible = "zmk,combos"; - chord_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; - chord_bt_prv { key-positions = ; bindings = <&bt BT_PRV>; }; - chord_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; - }; -}; diff --git a/config/boards/shields/the_paintbrush/Kconfig.defconfig b/config/boards/shields/the_paintbrush/Kconfig.defconfig index 2147204..07c7e4f 100644 --- a/config/boards/shields/the_paintbrush/Kconfig.defconfig +++ b/config/boards/shields/the_paintbrush/Kconfig.defconfig @@ -1,4 +1,4 @@ -if SHIELD_THE_PAINTBRUSH +if SHIELD_THE_PAINTBRUSH_LEFT || SHIELD_THE_PAINTBRUSH_RIGHT config ZMK_KEYBOARD_NAME default "The Paintbrush" diff --git a/config/boards/shields/the_paintbrush/Kconfig.shield b/config/boards/shields/the_paintbrush/Kconfig.shield index 4104e98..25ea641 100755 --- a/config/boards/shields/the_paintbrush/Kconfig.shield +++ b/config/boards/shields/the_paintbrush/Kconfig.shield @@ -1,5 +1,8 @@ # Copyright (c) 2021 Mike "KemoNine" Crosson # SPDX-License-Identifier: MIT -config SHIELD_THE_PAINTBRUSH - def_bool $(shields_list_contains,the_paintbrush) +config SHIELD_THE_PAINTBRUSH_LEFT + def_bool $(shields_list_contains,the_paintbrush_left) + +config SHIELD_THE_PAINTBRUSH_RIGHT + def_bool $(shields_list_contains,the_paintbrush_right) diff --git a/config/boards/shields/the_paintbrush/the_paintbrush.conf b/config/boards/shields/the_paintbrush/the_paintbrush_left.conf similarity index 100% rename from config/boards/shields/the_paintbrush/the_paintbrush.conf rename to config/boards/shields/the_paintbrush/the_paintbrush_left.conf diff --git a/config/boards/shields/the_paintbrush/the_paintbrush_left.keymap b/config/boards/shields/the_paintbrush/the_paintbrush_left.keymap new file mode 100644 index 0000000..a1aa7de --- /dev/null +++ b/config/boards/shields/the_paintbrush/the_paintbrush_left.keymap @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2021 Mike "KemoNine" Crosson + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include + +// Left/Right +#define ARTSEY_LEFT 1 + +// ARTS Row +#define KEY_A 3 +#define KEY_R 2 +#define KEY_T 1 +#define KEY_S 0 +// EYIO Row +#define KEY_E 7 +#define KEY_Y 6 +#define KEY_I 5 +#define KEY_O 4 + +// Define Offsets +#define LEADING_NONES NONE(0,0,0) +#define MIDDLE_NONES NONE(0, 0, 0) +#define TRAILING_NONES NONE(0, 0, 0) + +// Include main artsey.io keymap +#include "../../../artsey.dtsi" diff --git a/config/boards/shields/the_paintbrush/the_paintbrush_left.overlay b/config/boards/shields/the_paintbrush/the_paintbrush_left.overlay new file mode 100644 index 0000000..53dce07 --- /dev/null +++ b/config/boards/shields/the_paintbrush/the_paintbrush_left.overlay @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2021 Mike "KemoNine" Crosson + * + * SPDX-License-Identifier: MIT + */ + +#include + +/ { + chosen { + zmk,kscan = &kscan0; + }; + + kscan0: kscan_0 { + compatible = "zmk,kscan-gpio-direct"; + + label = "KSCAN"; + + input-gpios + = <&pro_micro_a 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_a 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_a 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_a 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_d 10 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_d 16 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_d 14 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&pro_micro_d 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; +}; + +&pro_micro_i2c { + status = "okay"; + + oled: ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; diff --git a/config/boards/shields/the_paintbrush/the_paintbrush_right.conf b/config/boards/shields/the_paintbrush/the_paintbrush_right.conf new file mode 100755 index 0000000..e7bb92f --- /dev/null +++ b/config/boards/shields/the_paintbrush/the_paintbrush_right.conf @@ -0,0 +1,17 @@ +# 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 + +# 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/config/boards/shields/the_paintbrush/the_paintbrush.keymap b/config/boards/shields/the_paintbrush/the_paintbrush_right.keymap similarity index 63% rename from config/boards/shields/the_paintbrush/the_paintbrush.keymap rename to config/boards/shields/the_paintbrush/the_paintbrush_right.keymap index 007a9fe..260bb37 100644 --- a/config/boards/shields/the_paintbrush/the_paintbrush.keymap +++ b/config/boards/shields/the_paintbrush/the_paintbrush_right.keymap @@ -8,7 +8,7 @@ #include #include -// THE BOARD IS FLIPPED FOR LEFT BUT STILL WIRED RIGHT! +// Left/Right #define ARTSEY_RIGHT 1 // ARTS Row @@ -29,12 +29,3 @@ // Include main artsey.io keymap #include "../../../artsey.dtsi" - -// Manage bluetooth profiles -/ { - combos { - compatible = "zmk,combos"; - chord_bt_nxt { key-positions = ; bindings = <&bt BT_NXT>; }; - chord_bt_clr { key-positions = ; bindings = <&bt BT_CLR>; }; - }; -}; \ No newline at end of file diff --git a/config/boards/shields/the_paintbrush/the_paintbrush.overlay b/config/boards/shields/the_paintbrush/the_paintbrush_right.overlay similarity index 100% rename from config/boards/shields/the_paintbrush/the_paintbrush.overlay rename to config/boards/shields/the_paintbrush/the_paintbrush_right.overlay