diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/README.md b/README.md index 426f727..b649486 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,20 @@ This is a custom layout for my wireless split Redox keyboard. -I use a neo2 layout in OS. +My OS is set to neo2. There are layers to type neo2 when OS is set differently. -# Firmware +See [config/redox.keymap](config/redox.keymap) for details. -Zip file can be found in [action artifacts](https://github.com/choopm/zmk-config/actions/workflows/build.yml). +Official ZMK docs: [https://zmk.dev/docs](https://zmk.dev/docs) + +I'm using nRFMicro 1.3. + +## Firmware upgrades + +Firmware files are available for 90 days as [action artifacts](https://github.com/choopm/zmk-config/actions/workflows/build.yml). + +Connect a cable, put both halves into bootloader mode and copy the uf2 files to MSD. + +When just updating keymaps only the left half needs to be reflashed. ![Redox](redox.jpg) 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 index 5f49d6e..434d8ed 100644 --- a/build.yaml +++ b/build.yaml @@ -1,8 +1,9 @@ -# 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, e.g: +# 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" ] @@ -10,6 +11,10 @@ # - 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: diff --git a/config/redox.keymap b/config/redox.keymap index d84a11e..9e57b8c 100644 --- a/config/redox.keymap +++ b/config/redox.keymap @@ -10,78 +10,90 @@ #include #include +#define ADJUST 3 + / { keymap { compatible = "zmk,keymap" ; -// assumes you use neo2 in OS +// keymap profile 0: os:neo2 actual:neo2 +// ------------------------------------------------------------------------------------------------------------------------------------- +// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | - | +// | TAB | Q | W | E | R | T | ESC/ADJUST | --- | EQUAL | Y | U | I | O | P | [ | +// | CAPS | A | S | D | F | G | PSCRN | --- | ] | H | J | K | L | ; | ' | +// | SHIFT | Z | X | C | V | B | PG_UP | PG_DOWN | --- | HOME | END | N | M | , | . | / | ADJUST | +// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | +// ------------------------------------------------------------------------------------------------------------------------------------- default_layer { -// -------------------------------------------------------------------------------------------------------------------------------- -// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | - | -// | TAB | Q | W | E | R | T | ESC | --- | EQUAL | Y | U | I | O | P | [ | -// | CAPS | A | S | D | F | G | PSCRN | --- | ] | H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | PG_UP | PG_DOWN | --- | HOME | END | N | M | , | . | / | | -// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS - &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp ESC &kp EQUAL &kp Y &kp U &kp I &kp O &kp P &kp LBKT + &kp TAB &kp Q &kp W &kp E &kp R &kp T < ADJUST ESC &kp EQUAL &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp CLCK &kp A &kp S &kp D &kp F &kp G &kp PSCRN &kp RBKT &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 PG_UP &kp PG_DN &kp HOME &kp END &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mo 3 + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp PG_UP &kp PG_DN &kp HOME &kp END &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mo ADJUST &kp LCTRL &kp LGUI &kp LALT &kp RALT &kp SPACE &kp BSPC &kp DEL &kp ESC &kp RET &kp SPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT >; - }; -// assumes you use german in OS +// keymap profile 1: os:qwertz, actual:neo2 +// ------------------------------------------------------------------------------------------------------------------------------------- +// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | - | +// | TAB | X | V | L | C | W | ESC/ADJUST | --- | EQUAL | K | H | G | F | Q | [ | +// | CAPS | U | I | A | E | O | PSCRN | --- | ] | S | N | R | T | D | ' | +// | SHIFT | [ | ; | ' | P | Z | PG_UP | PG_DOWN | --- | HOME | END | B | M | , | . | J | ADJUST | +// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | +// ------------------------------------------------------------------------------------------------------------------------------------- neo_layer { -// -------------------------------------------------------------------------------------------------------------------------------- -// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | - | -// | TAB | X | V | L | C | W | ESC | --- | EQUAL | K | H | G | F | Q | [ | -// | CAPS | U | I | A | E | O | PSCRN | --- | ] | S | N | R | T | D | ' | -// | SHIFT | [ | ; | ' | P | Z | PG_UP | PG_DOWN | --- | HOME | END | B | M | , | . | J | | -// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS - &kp TAB &kp X &kp V &kp L &kp C &kp W &kp ESC &kp EQUAL &kp K &kp H &kp G &kp F &kp Q &kp LBKT + &kp TAB &kp X &kp V &kp L &kp C &kp W < ADJUST ESC &kp EQUAL &kp K &kp H &kp G &kp F &kp Q &kp LBKT &kp CLCK &kp U &kp I &kp A &kp E &kp O &kp PSCRN &kp RBKT &kp S &kp N &kp R &kp T &kp D &kp SQT - &kp LSHFT &kp LBKT &kp SEMI &kp SQT &kp P &kp Z &kp PG_UP &kp PG_DN &kp HOME &kp END &kp B &kp M &kp COMMA &kp DOT &kp J &mo 3 + &kp LSHFT &kp LBKT &kp SEMI &kp SQT &kp P &kp Z &kp PG_UP &kp PG_DN &kp HOME &kp END &kp B &kp M &kp COMMA &kp DOT &kp J &mo ADJUST &kp LCTRL &kp LGUI &kp LALT &kp RALT &kp SPACE &kp BSPC &kp DEL &kp ESC &kp RET &kp SPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT >; - }; -// assumes you use neo2 in OS +// keymap profile 2: os:neo2, actual:qwertz +// ------------------------------------------------------------------------------------------------------------------------------------- +// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | = | +// | TAB | P | T | F | K | L | ESC/ADJUST | --- | EQUAL | ' | A | S | G | V | Z | +// | CAPS | D | H | ; | O | I | PSCRN | --- | ] | U | / | Y | E | X | C | +// | SHIFT | B | Q | R | W | N | PG_UP | PG_DOWN | --- | HOME | END | J | M | , | . | - | ADJUST | +// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | +// ------------------------------------------------------------------------------------------------------------------------------------- qwertz_layer { -// -------------------------------------------------------------------------------------------------------------------------------- -// | GRAVE | 1 | 2 | 3 | 4 | 5 | --- | 6 | 7 | 8 | 9 | 0 | = | -// | TAB | P | T | F | K | L | ESC | --- | EQUAL | ' | A | S | G | V | Z | -// | CAPS | D | H | ; | O | I | PSCRN | --- | ] | U | / | Y | E | X | C | -// | SHIFT | B | Q | R | W | N | PG_UP | PG_DOWN | --- | HOME | END | J | M | , | . | - | | -// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | LEFT | DOWN | UP | RIGHT | bindings = < &kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp EQUAL - &kp TAB &kp P &kp T &kp F &kp K &kp L &kp ESC &kp EQUAL &kp SQT &kp A &kp S &kp G &kp V &kp Z + &kp TAB &kp P &kp T &kp F &kp K &kp L < ADJUST ESC &kp EQUAL &kp SQT &kp A &kp S &kp G &kp V &kp Z &kp CLCK &kp D &kp H &kp SEMI &kp O &kp I &kp PSCRN &kp RBKT &kp U &kp FSLH &kp Y &kp E &kp X &kp C - &kp LSHFT &kp B &kp Q &kp R &kp W &kp N &kp PG_UP &kp PG_DN &kp HOME &kp END &kp J &kp M &kp COMMA &kp DOT &kp MINUS &mo 3 + &kp LSHFT &kp B &kp Q &kp R &kp W &kp N &kp PG_UP &kp PG_DN &kp HOME &kp END &kp J &kp M &kp COMMA &kp DOT &kp MINUS &mo ADJUST &kp LCTRL &kp LGUI &kp LALT &kp RALT &kp SPACE &kp BSPC &kp DEL &kp ESC &kp RET &kp SPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT >; - }; -// F1-12, volume, bluetooth and reset +// adjust layer, activated during press of ADJUST (or hold of ESC): +// numerical keys refer to F1-12, +// space,arrows: volume/media control +// both halves: +// - first row alphas: select bluetooth profiles 0-4, usb/bl output toggle +// - last row alphas: select keymap profiles 0-2 +// special use cases: +// - pgup/pos1: reset board +// - pgdn/end: enter bootloader +// - TAB/]: clear current bluetooth profile +// ---------------------------------------------------------------------------------------------------------------------------------------------------- +// | F11 | F1 | F2 | F3 | F4 | F5 | --- | F6 | F7 | F8 | F9 | F10 | F12 | +// | BT_CLR | BT0 | BT1 | BT2 | BT3 | BT4 | F11 | --- | F12 | BT0 | BT1 | BT2 | BT3 | BT4 | OUTPUT TGL | +// | | | | | | | OUTPUT TGL | --- | BT_CLR | | | | | | | +// | | L0 | L1 | L2 | | | RESET | BOOTL | --- | RESET | BOOTL | L0 | L1 | L2 | | | | +// | | | | | MUTE | | | --- | | | MUTE | PREV | VDN | VUP | NEXT | +// ---------------------------------------------------------------------------------------------------------------------------------------------------- adjust_layer { -// ----------------------------------------------------------------------------------------- -// | GRAVE | F1 | F2 | F3 | F4 | F5 | --- | F6 | F7 | F8 | F9 | F10 | - | -// | TAB | Q | W | E | R | T | F11 | --- | F12 | BT1 | BT2 | BT3 | BT4 | BT5 | OUTPUT TGL | -// | CAPS | A | S | D | F | G | PSCRN | --- | BT_CLR| H | J | K | L | ; | ' | -// | SHIFT | Z | X | C | V | B | RESET | BOOTL | --- | RESET| BOOTL | L0 | L1 | , | . | / | | -// | CRTL | GUI | ALT | RALT | SPACE | BKSP | DEL | --- | ESC | RET | SPACE | MUTE | VDN | VUP | RIGHT | - bindings = < - &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans - &trans &trans &trans &trans &trans &trans &kp F11 &kp F12 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &out OUT_TOG - &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR &trans &trans &trans &trans &trans &trans - &trans &trans &trans &trans &trans &trans &reset &bootloader &reset &bootloader &to 0 &to 1 &trans &trans &to 2 &trans - &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp K_MUTE &kp K_VOL_DN &kp K_VOL_UP &trans + bindings = < + &kp F11 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F12 + &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &out OUT_TOG + &none &none &none &none &none &none &out OUT_TOG &bt BT_CLR &none &none &none &none &none &none + &none &to 0 &to 1 &to 2 &none &none &sys_reset &bootloader &sys_reset &bootloader &to 0 &to 1 &to 2 &none &none &none + &none &none &none &none &kp K_MUTE &none &none &none &none &kp K_MUTE &kp K_PREV &kp K_VOL_DN &kp K_VOL_UP &kp K_NEXT >; }; }; diff --git a/config/west.yml b/config/west.yml index 379d291..b886cbe 100644 --- a/config/west.yml +++ b/config/west.yml @@ -2,6 +2,8 @@ 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 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: .