Skip to content

Commit

Permalink
Move to ZMK module for the keyboard, add Studio
Browse files Browse the repository at this point in the history
This commit moves the config repository to build from a ZMK module.
This allows the developer of the keyboard to add/tweak features without
the users having to pull changes - they can just re-build their firmware
and enjoy all the latest features.
As an example - this commit adds ZMK studio support with all the
necessary physical layout work done in the module.
  • Loading branch information
krikun98 committed Oct 7, 2024
1 parent 9f5812d commit 05d083c
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 201 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You have two options on how to configure your desired keymap:

#### Option 2. Manual

1. Make changes to the [ergonaut_one.keymap](config/boards/shields/ergonaut_one/ergonaut_one.keymap) file using your favorite text editor.
1. Make changes to the [ergonaut_one.keymap](config/ergonaut_one.keymap) file using your favorite text editor.
2. Commit changes to your repository.
3. Go to `Actions` tab in your Github repository, locate the latest build and wait for it to complete.
4. Grab the `firmware.zip` archive
Expand Down
10 changes: 10 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,15 @@ include:
shield: ergonaut_one_left
- board: seeeduino_xiao_ble
shield: ergonaut_one_right
- board: seeeduino_xiao_ble
shield: ergonaut_one_left
snippet: studio-rpc-usb-uart
cmake-args: -DCONFIG_ZMK_STUDIO=y
artifact-name: ergonaut-one-left-studio
- board: seeeduino_xiao_ble
shield: ergonaut_one_right
snippet: studio-rpc-usb-uart
cmake-args: -DCONFIG_ZMK_STUDIO=y
artifact-name: ergonaut-one-right-studio
- board: seeeduino_xiao_ble
shield: settings_reset
19 changes: 0 additions & 19 deletions config/boards/shields/ergonaut_one/Kconfig.defconfig

This file was deleted.

8 changes: 0 additions & 8 deletions config/boards/shields/ergonaut_one/Kconfig.shield

This file was deleted.

52 changes: 0 additions & 52 deletions config/boards/shields/ergonaut_one/ergonaut_one.dtsi

This file was deleted.

65 changes: 0 additions & 65 deletions config/boards/shields/ergonaut_one/ergonaut_one.keymap

This file was deleted.

11 changes: 0 additions & 11 deletions config/boards/shields/ergonaut_one/ergonaut_one.zmk.yml

This file was deleted.

2 changes: 0 additions & 2 deletions config/boards/shields/ergonaut_one/ergonaut_one_left.conf

This file was deleted.

18 changes: 0 additions & 18 deletions config/boards/shields/ergonaut_one/ergonaut_one_left.overlay

This file was deleted.

2 changes: 0 additions & 2 deletions config/boards/shields/ergonaut_one/ergonaut_one_right.conf

This file was deleted.

22 changes: 0 additions & 22 deletions config/boards/shields/ergonaut_one/ergonaut_one_right.overlay

This file was deleted.

1 change: 0 additions & 1 deletion config/ergonaut_one.keymap

This file was deleted.

69 changes: 69 additions & 0 deletions config/ergonaut_one.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

#define DEF 0
#define LWR 1
#define RSE 2
#define ADJ 3

&lt {
quick-tap-ms = <200>;
};

&mt {
quick-tap-ms = <200>;
};

/ {
conditional_layers {
compatible = "zmk,conditional-layers";

tri-layer {
if-layers = <LWR RSE>;
then-layer = <ADJ>;
};
};

keymap {
compatible = "zmk,keymap";

default_layer {
display-name = "MAIN";
bindings = <
&mt LGUI RBKT &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT
&mt LCTRL GRAVE &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &mt RCTRL SQT
&mt LALT MINUS &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mt RALT BSLH
&lt RSE TAB &mt LSHFT SPACE &lt LWR RET &lt LWR ESC &mt RSHFT BSPC &lt RSE DEL
>;
};
lower_layer {
display-name = "SYM";
bindings = <
&mt LGUI F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&mt LCTRL PLUS &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &mt RCTRL MINUS
&mt LALT EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp RALT
&trans &trans &trans &trans &trans &trans
>;
};

raise_layer {
display-name = "NUM";
bindings = <
&mt LGUI KP_NUM &kp KP_SLASH &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp C_VOL_UP &kp HOME &kp PSCRN &kp PG_UP &kp SLCK &kp CLCK
&mt LCTRL EQUAL &kp KP_MULTIPLY &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp C_MUTE &kp LEFT &kp UP &kp RIGHT &kp INS &mt RCTRL K_APP
&kp LALT &kp KP_N0 &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_DOT &kp C_VOL_DN &kp END &kp DOWN &kp PG_DN &kp PAUSE_BREAK &kp RALT
&trans &trans &trans &trans &trans &trans
>;
};
adjust_layer {
display-name = "ADJ";
bindings = <
&bootloader &studio_unlock &none &none &none &none &none &none &none &none &studio_unlock &bootloader
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &bt BT_SEL 4 &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_SEL 1 &bt BT_SEL 0 &bt BT_CLR
&sys_reset &none &none &none &none &none &none &none &none &none &none &sys_reset
&trans &none &trans &none &trans &trans
>;
};
};
};
5 changes: 5 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: ergonautkb
url-base: https://github.com/ergonautkb
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
- name: one-zmk-module
remote: ergonautkb
revision: main
self:
path: config

0 comments on commit 05d083c

Please sign in to comment.