One branch for corax56/corax54 (#12)

* rename corax56 to corax

* rename files

* reformat keymap

* update readme for corax54/56
This commit is contained in:
Daniel Bauer
2024-05-04 10:58:34 +02:00
committed by GitHub
parent 9dd449ba96
commit 65237036af
18 changed files with 257 additions and 245 deletions

View File

@@ -1,5 +1,17 @@
# Firmware for Splitkeyboard
# Firmware for the Corax keyboard
This is the [ZMK](https://zmk.dev/) firmware for the [Corax56](https://github.com/dnlbauer/corax56-keyboard).
This is the [ZMK](https://zmk.dev/) firmware for the [Corax](https://github.com/dnlbauer/corax-keyboard).
Optimised for US international.
Keymap optimised for US international.
## Corax56 vs Corax54
The Corax56 and Corax54 use the same shield.
The hardware of both keyboards is identical except the Corax54 is missing one key.
Therefore, you can use this ZMK config for both keyboards.
If you have a Corax54, just set the outer pinky key to `&none`
(basically, you can set it to whatever you want. It will be ignored).
## License
MIT License

View File

@@ -2,7 +2,7 @@
set -e
FLAGS="-p"
west build $FLAGS -b nice_nano_v2 -- -DSHIELD="corax56_left nice_view" -DZMK_CONFIG=/workspaces/zmk-config/config
west build $FLAGS -b nice_nano_v2 -- -DSHIELD="corax_left nice_view" -DZMK_CONFIG=/workspaces/zmk-config/config
mv /workspaces/zmk/app/build/zephyr/zmk.uf2 /workspaces/zmk-config/left.uf2
west build $FLAGS -b nice_nano_v2 -- -DSHIELD="corax56_right nice_view" -DZMK_CONFIG=/workspaces/zmk-config/config
west build $FLAGS -b nice_nano_v2 -- -DSHIELD="corax_right nice_view" -DZMK_CONFIG=/workspaces/zmk-config/config
mv /workspaces/zmk/app/build/zephyr/zmk.uf2 /workspaces/zmk-config/right.uf2

View File

@@ -14,8 +14,8 @@
---
include:
- board: nice_nano_v2
shield: corax56_left nice_view
shield: corax_left nice_view
- board: nice_nano_v2
shield: corax56_right nice_view
shield: corax_right nice_view
#- board: nice_nano_v2
#shield: settings_reset

View File

@@ -1,13 +1,13 @@
if SHIELD_CORAX56_LEFT
if SHIELD_CORAX_LEFT
config ZMK_KEYBOARD_NAME
default "Corax56"
default "Corax"
config ZMK_SPLIT_ROLE_CENTRAL
default y
endif
if SHIELD_CORAX56_LEFT || SHIELD_CORAX56_RIGHT
if SHIELD_CORAX_LEFT || SHIELD_CORAX_RIGHT
config ZMK_SPLIT
default y

View File

@@ -0,0 +1,5 @@
config SHIELD_CORAX_LEFT
def_bool $(shields_list_contains,corax_left)
config SHIELD_CORAX_RIGHT
def_bool $(shields_list_contains,corax_right)

View File

@@ -0,0 +1,210 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#define COLEMAK 0
#define QWERTY 1
#define WASD 2
#define SYM 3
#define NAV 4
#define DOUBLE 5
#define ADJUST 6
// additional caps word keys
&caps_word {
continue-list = <UNDERSCORE MINUS LS(MINUS) UP DOWN LEFT RIGHT BSPC DEL>;
};
/ {
behaviors {
lthp: layer_tap_hold_preferred {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
bindings = <&mo>, <&kp>;
};
mthp: mod_tap_hold_preferred {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
bindings = <&kp>, <&kp>;
};
};
macros {
// undead `
ud_grave: ud_grave {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp GRAVE &kp SPACE>;
};
// undead ~
ud_tilde: ud_tilde {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp TILDE &kp SPACE>;
};
// undead ^
ud_caret: ud_caret {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp CARET &kp SPACE>;
};
// undead '
ud_sqt: ud_sqt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp SQT &kp SPACE>;
};
// undead "
ud_dqt: ud_dqt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp LS(SQT) &kp SPACE>;
};
// ascii arrow ->
asc_arr: asc_arr {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp MINUS &kp LS(DOT)>;
};
};
combos {
compatible = "zmk,combos";
gm_capsword {
bindings = <&caps_word>;
// caps on G+M
key-positions = <28 29>;
};
sticky_adjust {
bindings = <&sl ADJUST>;
// sticky adjust layer on LALT+RALT
key-positions = <51 56>;
};
};
keymap {
compatible = "zmk,keymap";
colemak_layer {
display-name = "Colemak";
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp TAB &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &ud_sqt &kp RC(RA(F13))
&kp ESC &kp LCTRL &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &kp BSPC &kp RC(RA(F13))
&mt LSHFT LBRC &kp Z &kp X &kp C &kp D &kp V &kp C_MUTE &kp C_PP &kp K &kp H &kp COMMA &kp DOT &kp DEL &mt RSHFT RBRC
&kp LGUI &kp LALT &lthp SYM ESC &kp SPACE &kp ENTER &lt NAV ESC &kp RALT &kp RGUI
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
qwerty_layer {
display-name = "QWERTY";
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &trans
&trans &trans &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &trans &trans
&trans &kp Z &kp X &kp C &kp V &kp B &trans &trans &kp N &kp M &kp COMMA &kp DOT &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
gaming_layer {
display-name = "WASD";
bindings = <
&kp TILDE &kp N1 &kp N2 &kp N3 &kp N4 &trans &trans &trans &trans &trans
&kp ESC &kp TAB &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans &trans
&trans &trans &kp LCTRL &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans &trans
&trans &kp LBRC &kp Z &kp X &kp C &kp V &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
// left mod
sym_layer {
display-name = "Symbols";
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&trans &none &kp BSLH &kp PRCNT &kp DLLR &kp RA(LS(S)) &none &kp PIPE &ud_caret &kp SLASH &kp RA(N5) &kp F11
&trans &trans &none &kp LPAR &kp RPAR &kp COLON &asc_arr &none &ud_dqt &kp UNDER &kp LBKT &kp RBKT &kp F12 &trans
&trans &none &ud_grave &kp AT &kp AMPS &none &trans &trans &none &kp HASH &kp QMARK &kp EXCL &trans &trans
&trans &trans &trans &trans &trans &mo DOUBLE &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
// right mod
nav_layer {
display-name = "Num/Nav";
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&trans &kp SLASH &kp N7 &kp N8 &kp N9 &kp STAR &kp INS &kp HOME &kp END &kp PSCRN &none &trans
&trans &trans &kp DOT &kp N1 &kp N2 &kp N3 &kp EQUAL &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp SEMI &trans &trans
&trans &ud_tilde &kp N4 &kp N5 &kp N6 &kp PLUS &trans &trans &kp PAUSE_BREAK &kp PG_DN &kp PG_UP &none &none &trans
&trans &mt LALT MINUS &lt DOUBLE N0 &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>;
};
// double mod
double_layer {
display-name = "Double";
bindings = <
&none &none &none &none &none &none &none &none &none &none
&trans &none &none &none &none &none &none &none &none &none &none &trans
&trans &trans &none &none &none &none &none &none &none &none &none &none &trans &trans
&trans &none &none &none &none &none &trans &trans &none &none &none &none &none &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>;
};
adjust_layer {
display-name = "Adjust";
bindings = <
&none &none &none &none &sys_reset &sys_reset &none &none &none &none
&none &to QWERTY &none &to WASD &ext_power EP_TOG &none &none &none &none &none &none &none
&none &none &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &out OUT_TOG &none &bt BT_NXT &bt BT_PRV &out OUT_TOG &none &none &none
&none &none &none &to COLEMAK &none &none &trans &trans &none &none &none &none &none &none
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
};
};

View File

@@ -0,0 +1,12 @@
file_format: "1"
id: corax
name: Corax
type: shield
url: https://github.com/dnlbauer/corax-keyboard
requires: [pro_micro]
features:
- keys
- encoder
siblings:
- corax_left
- corax_right

View File

@@ -1,4 +1,4 @@
#include "corax56.dtsi"
#include "corax.dtsi"
&kscan0 {
diode-direction = "col2row";

View File

@@ -1,4 +1,4 @@
#include "corax56.dtsi"
#include "corax.dtsi"
&default_transform {
col-offset = <6>;

View File

@@ -1,5 +0,0 @@
config SHIELD_CORAX56_LEFT
def_bool $(shields_list_contains,corax56_left)
config SHIELD_CORAX56_RIGHT
def_bool $(shields_list_contains,corax56_right)

View File

@@ -1,210 +0,0 @@
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#define COLEMAK 0
#define QWERTY 1
#define WASD 2
#define SYM 3
#define NAV 4
#define DOUBLE 5
#define ADJUST 6
// additional caps word keys
&caps_word {
continue-list = <UNDERSCORE MINUS LS(MINUS) UP DOWN LEFT RIGHT BSPC DEL>;
};
/ {
behaviors {
lthp: layer_tap_hold_preferred {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
bindings = <&mo>, <&kp>;
};
mthp: mod_tap_hold_preferred {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "hold-preferred";
tapping-term-ms = <200>;
bindings = <&kp>, <&kp>;
};
};
macros {
// undead `
ud_grave: ud_grave {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp GRAVE &kp SPACE>;
};
// undead ~
ud_tilde: ud_tilde {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp TILDE &kp SPACE>;
};
// undead ^
ud_caret: ud_caret {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp CARET &kp SPACE>;
};
// undead '
ud_sqt: ud_sqt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp SQT &kp SPACE>;
};
// undead "
ud_dqt: ud_dqt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp LS(SQT) &kp SPACE>;
};
// ascii arrow ->
asc_arr: asc_arr {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
wait-ms = <10>;
tap-ms = <10>;
bindings = <&kp MINUS &kp LS(DOT)>;
};
};
combos {
compatible = "zmk,combos";
gm_capsword {
bindings = <&caps_word>;
// caps on G+M
key-positions = <28 29>;
};
sticky_adjust {
bindings = <&sl ADJUST>;
// sticky adjust layer on LALT+RALT
key-positions = <51 56>;
};
};
keymap {
compatible = "zmk,keymap";
colemak_layer {
display-name = "Colemak";
bindings = <
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp TAB &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &ud_sqt &kp RC(RA(F13))
&kp ESC &kp LCTRL &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &kp BSPC &kp RC(RA(F13))
&mt LSHFT LBRC &kp Z &kp X &kp C &kp D &kp V &kp C_MUTE &kp C_PP &kp K &kp H &kp COMMA &kp DOT &kp DEL &mt RSHFT RBRC
&kp LGUI &kp LALT &lthp SYM ESC &kp SPACE &kp ENTER &lt NAV ESC &kp RALT &kp RGUI
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
qwerty_layer {
display-name = "QWERTY";
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &trans
&trans &trans &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &trans &trans
&trans &kp Z &kp X &kp C &kp V &kp B &trans &trans &kp N &kp M &kp COMMA &kp DOT &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
gaming_layer {
display-name = "WASD";
bindings = <
&kp TILDE &kp N1 &kp N2 &kp N3 &kp N4 &trans &trans &trans &trans &trans
&kp ESC &kp TAB &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans &trans
&trans &trans &kp LCTRL &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans &trans &trans
&trans &kp LBRC &kp Z &kp X &kp C &kp V &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
// left mod
sym_layer {
display-name = "Symbols";
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&trans &none &kp BSLH &kp PRCNT &kp DLLR &kp RA(LS(S)) &none &kp PIPE &ud_caret &kp SLASH &kp RA(N5) &kp F11
&trans &trans &none &kp LPAR &kp RPAR &kp COLON &asc_arr &none &ud_dqt &kp UNDER &kp LBKT &kp RBKT &kp F12 &trans
&trans &none &ud_grave &kp AT &kp AMPS &none &trans &trans &none &kp HASH &kp QMARK &kp EXCL &trans &trans
&trans &trans &trans &trans &trans &mo DOUBLE &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
// right mod
nav_layer {
display-name = "Num/Nav";
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
&trans &kp SLASH &kp N7 &kp N8 &kp N9 &kp STAR &kp INS &kp HOME &kp END &kp PSCRN &none &trans
&trans &trans &kp DOT &kp N1 &kp N2 &kp N3 &kp EQUAL &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp SEMI &trans &trans
&trans &ud_tilde &kp N4 &kp N5 &kp N6 &kp PLUS &trans &trans &kp PAUSE_BREAK &kp PG_DN &kp PG_UP &none &none &trans
&trans &mt LALT MINUS &lt DOUBLE N0 &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>;
};
// double mod
double_layer {
display-name = "Double";
bindings = <
&none &none &none &none &none &none &none &none &none &none
&trans &none &none &none &none &none &none &none &none &none &none &trans
&trans &trans &none &none &none &none &none &none &none &none &none &none &trans &trans
&trans &none &none &none &none &none &trans &trans &none &none &none &none &none &trans
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp C_PREV C_NEXT>;
};
adjust_layer {
display-name = "Adjust";
bindings = <
&none &none &none &none &sys_reset &sys_reset &none &none &none &none
&none &to QWERTY &none &to WASD &ext_power EP_TOG &none &none &none &none &none &none &none
&none &none &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &out OUT_TOG &none &bt BT_NXT &bt BT_PRV &out OUT_TOG &none &none &none
&none &none &none &to COLEMAK &none &none &trans &trans &none &none &none &none &none &none
&trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_DN C_VOL_UP &inc_dec_kp PG_DN PG_UP>;
};
};
};

View File

@@ -1,12 +0,0 @@
file_format: "1"
id: corax56
name: Corax56
type: shield
url: https://github.com/dnlbauer/corax56-keyboard
requires: [pro_micro]
features:
- keys
- encoder
siblings:
- corax56_left
- corax56_right

View File

@@ -1,5 +1,5 @@
CONFIG_ZMK_KEYBOARD_NAME="Corax56"
CONFIG_ZMK_KEYBOARD_NAME="Corax"
# Uncomment these lines to add support for encoders
CONFIG_EC11=y

View File

@@ -1,8 +1,8 @@
{
"id": "corax56",
"name": "corax56",
"keyboard_name": "Corax56",
"url": "https://github.com/dnlbauer/corax56-keyboard",
"id": "corax",
"name": "corax",
"keyboard_name": "Corax",
"url": "https://github.com/dnlbauer/corax-keyboard",
"maintainer": "",
"layouts": {
"LAYOUT": {

1
config/corax.keymap Symbolic link
View File

@@ -0,0 +1 @@
boards/shields/corax/corax.keymap

View File

@@ -1 +0,0 @@
boards/shields/corax56/corax56.keymap