Skip to content

Commit

Permalink
initial configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
cbxm committed Oct 3, 2024
1 parent 37bf0ec commit a1440ca
Show file tree
Hide file tree
Showing 7 changed files with 191 additions and 133 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: LOWPROKB/zmk/.github/workflows/build-user-config.yml@corne-ish-zen-v2
on: [push, pull_request, workflow_dispatch]

jobs:
build:
uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build/
zmk/
zephyr/
modules/
tools/
build/
zmk/
zephyr/
modules/
tools/
.west/
90 changes: 45 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# Corne-ish Zen V2 Custom Configuration

![Corne-ish Zen Logo](img/Zen_R3_sticker.png)

**NOTE: This code is currently merged into ZMK Main.**

This repo is the official configuration of the Corne-ish Zen V2 low profile wireless mechanical keyboard. Use it to develop your own keymap and easily build your own ZMK firmware to run on your Corne-ish Zen. These steps will get you using your keymap on your keyboard in the fastest time possible. It uses the GitHub Actions feature to build your firmware online, rather than setting up a complex tool chain on your local computer.

If you are looking to dig deeper into ZMK and develop new functionality, it is recommended to follow the steps of installing ZMK as found on the official ZMK documentation site (linked below).

V2 PCBs were only used in the 3rd GB round (R3). To confirm which version you need, remove the bottom from the keyboard and look beside the Corne-ish Zen logo for a version number. Group Buy rounds 1 and 2 have V1 PCBs and R3 has V2 PCBs. (Also V2 PCBs have white power switches... V1 PCBs have black ones.)

## Resources

- The [official ZMK Firmware GitHub](https://github.com/zmkfirmware/zmk) repository. View the keymaps for other boards and shields as a starting point for your keymap.
- The [official ZMK Documentation](https://zmk.dev/docs) web site. Find the answers to many of your questions about ZMK Firmware.
- The [official ZMK Discord Server](https://zmk.dev/community/discord/invite). Instant conversations with other ZMK developers and users. Great technical resource!

## Instructions

1. Log into, or sign up for, your personal GitHub account.
2. Fork this repository to your local computer, and then push it to your GitHub personal account. ([instructions](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
3. Edit the keymap file(s) to suit your needs:
- Change [the keymap file](/config/corneish_zen.keymap) to edit keycodes, add new layers etc.
- Change [the conf file](/config/corneish_zen.conf) to edit configuration settings like changing the deep sleep timeout
4. Commit and push your changes to your personal repo. Upon pushing it, GitHub Actions will start building a new version of your firmware with the updated keymap.

> **Note**
>
> After forking the repo to your own account, you can also edit the files directly using the GitHub web interface via the edit button on the top right (keyboard shortcut `e`) or via the [GitHub Dev](https://github.com/github/dev) interface (keyboard shortcut `.`) and commit your changes.
## Firmware Files

To locate your firmware files...

1. Log into GitHub and navigate to your personal config repository you just uploaded your keymap changes to.
2. Click "Actions" in the main navigation, and in the left navigation click the "Build" link.
3. Select the desired workflow run in the centre area of the page (based on date and time of the build you wish to use). You can also start a new build from this page by clicking the "Run workflow" button.
4. After clicking the desired workflow run, you should be presented with a section at the bottom of the page called "Artifacts". This section contains the results of your build, in a file called "firmware.zip"
5. Download the firmware zip archive and extract the two `.uf2` files. They are named according to which side they need to be flashed to.
6. Flash the firmware to your keyboard by double-clicking the reset button to put the it in bootloader mode. A window should pop up showing the contents of the storage on the keyboard. Drag and drop the correct `.uf2` file into the window. When the upload is complete the window will close and the keyboard will exit bootloader mode.
- If you only changed [the keymap file](/config/corneish_zen.keymap) you only need to flash the left side firmware to the left side.
- If you changed [the conf file](/config/corneish_zen.conf) you should flash both sides their respective files.

Your keyboard is now ready to use.
# Corne-ish Zen V2 Custom Configuration

![Corne-ish Zen Logo](img/Zen_R3_sticker.png)

**NOTE: This code is currently merged into ZMK Main.**

This repo is the official configuration of the Corne-ish Zen V2 low profile wireless mechanical keyboard. Use it to develop your own keymap and easily build your own ZMK firmware to run on your Corne-ish Zen. These steps will get you using your keymap on your keyboard in the fastest time possible. It uses the GitHub Actions feature to build your firmware online, rather than setting up a complex tool chain on your local computer.

If you are looking to dig deeper into ZMK and develop new functionality, it is recommended to follow the steps of installing ZMK as found on the official ZMK documentation site (linked below).

V2 PCBs were only used in the 3rd GB round (R3). To confirm which version you need, remove the bottom from the keyboard and look beside the Corne-ish Zen logo for a version number. Group Buy rounds 1 and 2 have V1 PCBs and R3 has V2 PCBs. (Also V2 PCBs have white power switches... V1 PCBs have black ones.)

## Resources

- The [official ZMK Firmware GitHub](https://github.com/zmkfirmware/zmk) repository. View the keymaps for other boards and shields as a starting point for your keymap.
- The [official ZMK Documentation](https://zmk.dev/docs) web site. Find the answers to many of your questions about ZMK Firmware.
- The [official ZMK Discord Server](https://zmk.dev/community/discord/invite). Instant conversations with other ZMK developers and users. Great technical resource!

## Instructions

1. Log into, or sign up for, your personal GitHub account.
2. Fork this repository to your local computer, and then push it to your GitHub personal account. ([instructions](https://docs.github.com/en/get-started/quickstart/fork-a-repo))
3. Edit the keymap file(s) to suit your needs:
- Change [the keymap file](/config/corneish_zen.keymap) to edit keycodes, add new layers etc.
- Change [the conf file](/config/corneish_zen.conf) to edit configuration settings like changing the deep sleep timeout
4. Commit and push your changes to your personal repo. Upon pushing it, GitHub Actions will start building a new version of your firmware with the updated keymap.

> **Note**
>
> After forking the repo to your own account, you can also edit the files directly using the GitHub web interface via the edit button on the top right (keyboard shortcut `e`) or via the [GitHub Dev](https://github.com/github/dev) interface (keyboard shortcut `.`) and commit your changes.
## Firmware Files

To locate your firmware files...

1. Log into GitHub and navigate to your personal config repository you just uploaded your keymap changes to.
2. Click "Actions" in the main navigation, and in the left navigation click the "Build" link.
3. Select the desired workflow run in the centre area of the page (based on date and time of the build you wish to use). You can also start a new build from this page by clicking the "Run workflow" button.
4. After clicking the desired workflow run, you should be presented with a section at the bottom of the page called "Artifacts". This section contains the results of your build, in a file called "firmware.zip"
5. Download the firmware zip archive and extract the two `.uf2` files. They are named according to which side they need to be flashed to.
6. Flash the firmware to your keyboard by double-clicking the reset button to put the it in bootloader mode. A window should pop up showing the contents of the storage on the keyboard. Drag and drop the correct `.uf2` file into the window. When the upload is complete the window will close and the keyboard will exit bootloader mode.
- If you only changed [the keymap file](/config/corneish_zen.keymap) you only need to flash the left side firmware to the left side.
- If you changed [the conf file](/config/corneish_zen.conf) you should flash both sides their respective files.

Your keyboard is now ready to use.
6 changes: 3 additions & 3 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include:
- board: corneish_zen_v2_left
- board: corneish_zen_v2_right
include:
- board: corneish_zen_v2_left
- board: corneish_zen_v2_right
14 changes: 10 additions & 4 deletions config/corneish_zen.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# go to sleep after one hour (1*60*60*1000ms)
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000

# Turn on logging, and set ZMK logging to debug output
# Go to sleep after one hour (1*60*60*1000ms)
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000

# Increase Bluetooth power level
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

# Enable mouse stuff
CONFIG_ZMK_MOUSE=y

# Turn on logging, and set ZMK logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
172 changes: 112 additions & 60 deletions config/corneish_zen.keymap
Original file line number Diff line number Diff line change
@@ -1,60 +1,112 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

/ {
chosen {
zmk,matrix_transform = &default_transform;
//zmk,matrix_transform = &five_column_transform;
};
};

/ {
keymap {
compatible = "zmk,keymap";

default_layer {
label = "QWERTY";
// -----------------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BKSP |
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
// | GUI | LWR | SPC | | ENT | RSE | ALT |
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 LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
>;
};
lower_layer {
label = "NUMBER";
// -----------------------------------------------------------------------------------------
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
// | SHFT | | | | | | | | | | | | |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};

raise_layer {
label = "SYMBOL";
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp STAR &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
};
};
/*
*
* Copyright (c) 2021 Darryl deHaan
* SPDX-License-Identifier: MIT
*
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>

/ {
chosen {
zmk,matrix_transform = &default_transform;

// zmk,matrix_transform = &five_column_transform;
};
};

/ {
keymap {
compatible = "zmk,keymap";

base {
label = "base";

// --------------------------------------------------------------------------------
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | ALT |
// | BKSP | A | S | D | F | G | | H | J | K | L | ; | ' |
// | DEVICE| Z | X | C | V | B | | N | M | , | . | / | SHFT/ENT |
// | LWR | BACK| CTRL| | ENT | SPC | RSE |

bindings = <
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &mt RALT DELETE
&kp BACKSPACE &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &lt 2 SQT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LEFT_GUI &kp ENTER &mt LCTRL ESCAPE &mt LALT ENTER &lt 3 SPACE &lt 1 K_CONTEXT_MENU
>;
};

f-numbers {
label = "f-num";

// -----------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP |
// | | | | | | | | | | | | | |
// | | | | | | | | | | | | | SHFT |
// | LWR | BACK| CTRL| | ENT | SPC | RSE |

bindings = <
&trans &kp F10 &kp F7 &kp F8 &kp F9 &none &kp KP_PLUS &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_MULTIPLY &trans
&trans &kp F11 &kp F4 &kp F5 &kp F6 &none &kp KP_MINUS &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_DIVIDE &kp KP_EQUAL
&trans &kp F12 &kp F1 &kp F2 &kp F3 &none &kp KP_NUMBER_0 &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &mt COMMA PERIOD &trans
&trans &trans &trans &trans &trans &mo 1
>;
};

symbols {
bindings = <
&trans &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 BACKSLASH
&trans &kp GRAVE &kp LS(LBRC) &kp LBKT &kp LS(LPAR) &kp EQUAL &kp MINUS &none &none &none &kp DQT &none
&trans &kp LS(TILDE) &kp LS(RBRC) &kp RBKT &kp LS(RPAR) &kp LS(PLUS) &kp UNDERSCORE &none &none &none &none &trans
&trans &trans &trans &trans &trans &trans
>;

label = "sym";
};

navigation {
label = "nav";

// -----------------------------------------------------------------------------------------
// | ESC | | | ( | ) | = | | | | | | | |
// | DEL | | | [ | ] | - | | LFT | DWN | UP | RGT | | |
// | | | | { | } | \ | | | | | | | SHFT |
// | LWR | BACK| CTRL| | ENT | SPC | RSE |

bindings = <
&trans &none &none &none &none &none &none &none &none &none &trans &trans
&trans &none &none &none &none &kp PG_UP &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp K_MUTE &none
&trans &none &none &kp HOME &kp END &kp PG_DN &kp K_PP &kp K_PREV &kp K_NEXT &kp C_VOL_DN &kp C_VOL_UP &trans
&trans &trans &trans &trans &trans &none
>;
};

board {
label = "keeb";

// -----------------------------------------------------------------------------------------
// | | | |BTCLR|BTNXT|BTNXT| | | | | | | |
// | | | | | | | | | | | | | |
// | | PLAY|PREV |NEXT |VOLUP|VOLDN| | | | | | | |
// | LWR | BACK| CTRL| | ENT | SPC | RSE |

bindings = <
&none &none &none &bt BT_CLR &bt BT_PRV &bt BT_NXT &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
&none &none &none &none &none &mo 1
>;
};
};

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

keeb {
if-layers = <2 1>;
then-layer = <4>;
};
};
};
22 changes: 11 additions & 11 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
self:
path: config

0 comments on commit a1440ca

Please sign in to comment.