From 3fba4aba2d79b710be41b3d0fbfc32c3951ce11d Mon Sep 17 00:00:00 2001 From: "Waylon S. Walker" Date: Mon, 23 Sep 2024 19:18:10 -0500 Subject: [PATCH] init --- .github/workflows/build.yml | 5 + Readme.md | 1 + boards/shields/.gitkeep | 0 build.yaml | 21 +++ .../shields/wyatt-3x5/Kconfig.defconfig | 12 ++ .../boards/shields/wyatt-3x5/Kconfig.shield | 2 + .../boards/shields/wyatt-3x5/wyatt-3x5.keymap | 21 +++ .../shields/wyatt-3x5/wyatt-3x5.overlay | 42 +++++ config/west.yml | 13 ++ config/wyatt-3x5.conf | 2 + config/wyatt-3x5.json | 55 +++++++ config/wyatt-3x5.keymap | 154 ++++++++++++++++++ zephyr/module.yml | 3 + 13 files changed, 331 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 Readme.md create mode 100644 boards/shields/.gitkeep create mode 100644 build.yaml create mode 100644 config/boards/shields/wyatt-3x5/Kconfig.defconfig create mode 100644 config/boards/shields/wyatt-3x5/Kconfig.shield create mode 100644 config/boards/shields/wyatt-3x5/wyatt-3x5.keymap create mode 100644 config/boards/shields/wyatt-3x5/wyatt-3x5.overlay create mode 100644 config/west.yml create mode 100644 config/wyatt-3x5.conf create mode 100644 config/wyatt-3x5.json create mode 100644 config/wyatt-3x5.keymap create mode 100644 zephyr/module.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d74fb89 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,5 @@ +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..fe334da --- /dev/null +++ b/Readme.md @@ -0,0 +1 @@ +# Wyatt 3x5 diff --git a/boards/shields/.gitkeep b/boards/shields/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..67a5e57 --- /dev/null +++ b/build.yaml @@ -0,0 +1,21 @@ +# This file generates the GitHub Actions matrix. +# For simple board + shield combinations, add them to the top level board and +# shield arrays, for more control, add individual board + shield combinations +# to the `include` property. You can also use the `cmake-args` property to +# pass flags to the build command and `artifact-name` to assign a name to +# distinguish build outputs from each other: +# +# board: [ "nice_nano_v2" ] +# shield: [ "corne_left", "corne_right" ] +# include: +# - board: bdn9_rev2 +# - board: nice_nano_v2 +# shield: reviung41 +# - board: nice_nano_v2 +# shield: corne_left +# cmake-args: -DCONFIG_ZMK_USB_LOGGING=y +# artifact-name: corne_left_with_logging +# +include: + - board: nice_nano + shield: wyatt-3x5 diff --git a/config/boards/shields/wyatt-3x5/Kconfig.defconfig b/config/boards/shields/wyatt-3x5/Kconfig.defconfig new file mode 100644 index 0000000..9fd1562 --- /dev/null +++ b/config/boards/shields/wyatt-3x5/Kconfig.defconfig @@ -0,0 +1,12 @@ +if SHIELD_wyatt-3x5 + +config ZMK_KEYBOARD_NAME + default "wyatt-3x5" + +config USB_DEVICE_MANUFACTURER + default "Tickle My Keys" + +config ZMK_MOUSE + default y + +endif diff --git a/config/boards/shields/wyatt-3x5/Kconfig.shield b/config/boards/shields/wyatt-3x5/Kconfig.shield new file mode 100644 index 0000000..7c2011b --- /dev/null +++ b/config/boards/shields/wyatt-3x5/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_wyatt-3x5 + def_bool $(shields_list_contains,wyatt-3x5) diff --git a/config/boards/shields/wyatt-3x5/wyatt-3x5.keymap b/config/boards/shields/wyatt-3x5/wyatt-3x5.keymap new file mode 100644 index 0000000..568d350 --- /dev/null +++ b/config/boards/shields/wyatt-3x5/wyatt-3x5.keymap @@ -0,0 +1,21 @@ +#include +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + label = "wyatt-3x5"; + default_layer { + label = "Default"; + bindings = < + &kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BACKSPACE + &kp ESC &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI_COLON &kp QUOTE + &kp SHIFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp CTRL + &kp CTRL &kp ALT &kp GUI &kp ENTER &kp SPACE &kp SHIFT + >; + }; + }; +}; + + diff --git a/config/boards/shields/wyatt-3x5/wyatt-3x5.overlay b/config/boards/shields/wyatt-3x5/wyatt-3x5.overlay new file mode 100644 index 0000000..f04dce0 --- /dev/null +++ b/config/boards/shields/wyatt-3x5/wyatt-3x5.overlay @@ -0,0 +1,42 @@ +#include + +/ { + chosen { + zmk,kscan = &default_kscan; + zmk,matrix_transform = &default_transform; + /delete-property/ zephyr,console; + /delete-property/ zephyr,shell-uart; + }; + + default_kscan: kscan { + compatible = "zmk,kscan-gpio-matrix"; + label = "default_kscan"; + diode-direction = "col2row"; + + col-gpios + = <&gpio0 09 GPIO_ACTIVE_HIGH> + , <&gpio0 10 GPIO_ACTIVE_HIGH> + , <&gpio1 11 GPIO_ACTIVE_HIGH> + , <&gpio1 13 GPIO_ACTIVE_HIGH> + , <&gpio1 15 GPIO_ACTIVE_HIGH> + ; + + row-gpios + = <&gpio1 06 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 04 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + default_transform: matrix_transform { + compatible = "zmk,matrix-transform"; + columns = <5>; + rows = <3>; + map = < + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) + >; + }; +}; + diff --git a/config/west.yml b/config/west.yml new file mode 100644 index 0000000..2a43f28 --- /dev/null +++ b/config/west.yml @@ -0,0 +1,13 @@ +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + # Additional modules containing boards/shields/custom code can be listed here as well + # See https://docs.zephyrproject.org/3.2.0/develop/west/manifest.html#projects + projects: + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml + self: + path: config diff --git a/config/wyatt-3x5.conf b/config/wyatt-3x5.conf new file mode 100644 index 0000000..09b7f3c --- /dev/null +++ b/config/wyatt-3x5.conf @@ -0,0 +1,2 @@ +CONFIG_BT_MAX_CONN=10 +CONFIG_BT_MAX_PAIRED=10 diff --git a/config/wyatt-3x5.json b/config/wyatt-3x5.json new file mode 100644 index 0000000..891cd89 --- /dev/null +++ b/config/wyatt-3x5.json @@ -0,0 +1,55 @@ +{ + "layouts": { + "default_layout": { + "name": "default_layout", + "layout": [ + { "row": 0, "col": 0, "x": 0, "y": 0 }, + { "row": 0, "col": 1, "x": 1, "y": 0 }, + { "row": 0, "col": 2, "x": 2, "y": 0 }, + { "row": 0, "col": 3, "x": 3, "y": 0 }, + { "row": 0, "col": 4, "x": 4, "y": 0 }, + { "row": 0, "col": 5, "x": 5, "y": 0 }, + { "row": 0, "col": 6, "x": 12, "y": 0 }, + { "row": 0, "col": 7, "x": 13, "y": 0 }, + { "row": 0, "col": 8, "x": 14, "y": 0 }, + { "row": 0, "col": 9, "x": 15, "y": 0 }, + { "row": 0, "col": 10, "x": 16, "y": 0 }, + { "row": 0, "col": 11, "x": 17, "y": 0 }, + + { "row": 1, "col": 0, "x": 0, "y": 1 }, + { "row": 1, "col": 1, "x": 1, "y": 1 }, + { "row": 1, "col": 2, "x": 2, "y": 1 }, + { "row": 1, "col": 3, "x": 3, "y": 1 }, + { "row": 1, "col": 4, "x": 4, "y": 1 }, + { "row": 1, "col": 5, "x": 5, "y": 1 }, + { "row": 1, "col": 6, "x": 12, "y": 1 }, + { "row": 1, "col": 7, "x": 13, "y": 1 }, + { "row": 1, "col": 8, "x": 14, "y": 1 }, + { "row": 1, "col": 9, "x": 15, "y": 1 }, + { "row": 1, "col": 10, "x": 16, "y": 1 }, + { "row": 1, "col": 11, "x": 17, "y": 1 }, + + { "row": 2, "col": 0, "x": 0, "y": 2 }, + { "row": 2, "col": 1, "x": 1, "y": 2 }, + { "row": 2, "col": 2, "x": 2, "y": 2 }, + { "row": 2, "col": 3, "x": 3, "y": 2 }, + { "row": 2, "col": 4, "x": 4, "y": 2 }, + { "row": 2, "col": 5, "x": 5, "y": 2 }, + { "row": 2, "col": 6, "x": 12, "y": 2 }, + { "row": 2, "col": 7, "x": 13, "y": 2 }, + { "row": 2, "col": 8, "x": 14, "y": 2 }, + { "row": 2, "col": 9, "x": 15, "y": 2 }, + { "row": 2, "col": 10, "x": 16, "y": 2 }, + { "row": 2, "col": 11, "x": 17, "y": 2 }, + + { "row": 3, "col": 3, "x": 4, "y": 3 }, + { "row": 3, "col": 4, "x": 5, "y": 3 }, + { "row": 3, "col": 5, "x": 6, "y": 3 }, + { "row": 3, "col": 6, "x": 11, "y": 3 }, + { "row": 3, "col": 7, "x": 12, "y": 3 }, + { "row": 3, "col": 8, "x": 13, "y": 3 } + ] + } + }, + "sensors": [] +} diff --git a/config/wyatt-3x5.keymap b/config/wyatt-3x5.keymap new file mode 100644 index 0000000..d64a105 --- /dev/null +++ b/config/wyatt-3x5.keymap @@ -0,0 +1,154 @@ +#include +#include +#include +#include + +/ { + behaviors { + gaming_active: gaming_active { + compatible = "zmk,behavior-tap-dance"; + label = "GAMING_ACTIVE"; + #binding-cells = <0>; + bindings = <&kp Q>, <&kp Q>, <&to 3>; + }; + + gaming_deactive: gaming_deactive { + compatible = "zmk,behavior-tap-dance"; + label = "GAMING_DEACTIVE"; + #binding-cells = <0>; + bindings = <&kp RIGHT_SHIFT>, <&to 0>; + }; + + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + bindings = <&kp>, <&kp>; + + #binding-cells = <2>; + tapping-term-ms = <150>; + flavor = "tap-preferred"; + }; + + hl: homerow_layer { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_LAYER"; + bindings = <&mo>, <&kp>; + + #binding-cells = <2>; + tapping-term-ms = <150>; + flavor = "tap-preferred"; + }; + }; + + macros { + vim___0: vim___0 { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&kp END &kp ENTER>; + label = "vim___0"; + }; + + vim___w: vim___w { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&none>; + label = "VIM___W"; + }; + }; + + keymap { + compatible = "zmk,keymap"; + label = "wyatt-3x5"; + + default_layer { + label = "Default"; + bindings = < +&kp TAB &gaming_active &kp W &kp E &kp R < 8 T < 8 Y &kp U &kp I &kp O &kp P &kp BACKSPACE +&hl 4 ESC &hl 2 A &kp S &hm LEFT_SHIFT D &hm LCTRL F &kp G &kp H &hm RCTRL J &hm RIGHT_SHIFT K &kp L &kp SEMI &kp SQT +&kp LSHFT &kp Z &kp X < 5 C < 6 V < 7 B &kp N &kp M &kp COMMA &kp PERIOD &kp SLASH &kp LS(LG(LA(LCTRL))) + &kp LG(LGUI) &kp LALT &kp LCTRL &kp RET < 1 SPACE &kp RSHFT + >; + }; + + symbols { + bindings = < +&kp LS(EXCL) &kp LS(EXCL) &kp LS(AT) &kp LS(POUND) &kp LS(DLLR) &kp LS(PRCNT) &kp LS(CARET) &kp LS(AMPS) &kp LS(STAR) &kp LS(LPAR) &kp LS(RPAR) &kp DEL +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LS(LBRC) &kp LS(RBRC) &kp LS(PIPE) &kp LS(TILDE) + &kp BACKSPACE &kp TAB &kp DEL &trans &trans &trans + >; + }; + + numpad { + bindings = < +&kp TAB &trans &trans &kp LBKT &kp RBKT < 8 PERCENT &kp LS(PLUS) &kp N7 &kp N8 &kp N9 &kp STAR &kp BSPC +&trans &trans &kp UNDER &mt LEFT_SHIFT LEFT_PARENTHESIS &mt LS(LEFT_CONTROL) RIGHT_PARENTHESIS &kp LS(DLLR) &kp MINUS &kp N4 &kp N5 &kp N6 &kp LS(UNDER) &kp GRAVE +&trans &trans &kp DOT &kp LS(LEFT_BRACE) &kp LS(RIGHT_BRACE) &kp N0 &kp N0 &kp N1 &kp N2 &kp N3 &kp DOT &kp FSLH + &trans &trans &trans &trans &trans &trans + >; + }; + + gaming { + bindings = < +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp L &kp SQT +&mt LEFT_CONTROL ESCAPE &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &trans + &kp LSHFT &kp SPACE &kp LCTRL &kp ENTER &kp SPACE &gaming_deactive + >; + }; + + vimmy { + bindings = < +&kp TAB &trans &kp LC(RIGHT) &kp LC(RIGHT) &kp LEFT &trans &kp LC(C) &kp PG_UP &kp HOME &vim___0 &kp LC(V) &kp DEL +&trans &kp END &kp HOME &kp PG_DN &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans +&trans &trans &trans &trans &kp GRAVE &kp LC(LEFT) &trans &trans &kp LBKT &kp RBKT &kp BSLH &kp LS(TILDE) + &trans &trans &trans &kp RET &trans &kp RSHFT + >; + }; + + switchwin { + bindings = < +&trans &trans &trans &trans &trans &trans &trans &kp LG(N7) &kp LG(N8) &kp LG(N9) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(N4) &kp LG(N5) &kp LG(N6) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(N1) &kp LG(N2) &kp LG(N3) &trans &trans + &trans &trans &trans &trans &trans &trans + >; + }; + + joinwin { + bindings = < +&trans &trans &trans &trans &trans &trans &trans &kp LG(LC(N7)) &kp LG(LC(N8)) &kp LG(LC(N9)) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(LC(N4)) &kp LG(LC(N5)) &kp LG(LC(N6)) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(LC(N1)) &kp LG(LC(N2)) &kp LG(LC(N3)) &trans &trans + &trans &trans &trans &trans &trans &trans + >; + }; + + sendwin { + bindings = < +&trans &trans &trans &trans &trans &trans &trans &kp LG(LS(N7)) &kp LG(LS(N8)) &kp LG(LS(N9)) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(LS(N4)) &kp LG(LS(N5)) &kp LG(LS(N6)) &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp LG(LS(N1)) &kp LG(LS(N2)) &kp LG(LS(N3)) &trans &trans + &trans &trans &trans &trans &trans &trans + >; + }; + + fkeys { + bindings = < +&bootloader &trans &bt BT_SEL 7 &bt BT_SEL 8 &bt BT_SEL 9 &out OUT_USB &trans &kp F7 &kp F8 &kp F9 &trans &trans +&bt BT_CLR &trans &bt BT_SEL 4 &bt BT_SEL 5 &bt BT_SEL 6 &out OUT_BLE &trans &kp F4 &kp F5 &kp F6 &kp F11 &kp F12 +&trans &trans &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 0 &kp F10 &kp F1 &kp F2 &kp F3 &trans &trans + &trans &trans &mo 9 &trans &trans &trans + >; + }; + + media { + bindings = < +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &kp K_PREVIOUS &kp K_NEXT &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &kp K_PLAY_PAUSE &trans + >; + }; + }; +}; diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 0000000..1cc2b35 --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,3 @@ +build: + settings: + board_root: .