1
0
mirror of https://github.com/tcaxle/zmk-config.git synced 2024-11-21 06:41:56 +00:00

multiple boards

This commit is contained in:
Charlie Crossley 2023-10-17 12:25:40 +01:00
parent d662164b66
commit 445e2abfec
7 changed files with 363 additions and 0 deletions

9
build.yaml Normal file
View File

@ -0,0 +1,9 @@
include:
- board: nice_nano_v2
shield: corne_left
- board: nice_nano_v2
shield: corne_right
- board: nice_nano_v2
shield: sofle_left
- board: nice_nano_v2
shield: sofle_right

6
config/corne.conf Normal file
View File

@ -0,0 +1,6 @@
# Uncomment the following lines to enable the Corne RGB Underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# Uncomment the following line to enable the Corne OLED Display
# CONFIG_ZMK_DISPLAY=y

56
config/corne.json Normal file
View File

@ -0,0 +1,56 @@
{
"id": "corne",
"name": "corne",
"layouts": {
"LAYOUT": {
"layout": [
{ "label": "Tab", "row": 0, "col": 0, "x": 0, "y": 0.36 },
{ "label": "Q", "row": 0, "col": 1, "x": 1, "y": 0.36 },
{ "label": "W", "row": 0, "col": 2, "x": 2, "y": 0.11 },
{ "label": "E", "row": 0, "col": 3, "x": 3, "y": -0.015 },
{ "label": "R", "row": 0, "col": 4, "x": 4, "y": 0.11 },
{ "label": "T", "row": 0, "col": 5, "x": 5, "y": 0.235 },
{ "label": "Y", "row": 0, "col": 7, "x": 9, "y": 0.235 },
{ "label": "U", "row": 0, "col": 8, "x": 10, "y": 0.11 },
{ "label": "I", "row": 0, "col": 9, "x": 11, "y": -0.015 },
{ "label": "O", "row": 0, "col": 10, "x": 12, "y": 0.11 },
{ "label": "P", "row": 0, "col": 11, "x": 13, "y": 0.36 },
{ "label": "BSPC", "row": 0, "col": 12, "x": 14, "y": 0.36 },
{ "label": "Ctrl", "row": 1, "col": 0, "x": 0, "y": 1.36 },
{ "label": "A", "row": 1, "col": 1, "x": 1, "y": 1.36 },
{ "label": "S", "row": 1, "col": 2, "x": 2, "y": 1.11 },
{ "label": "D", "row": 1, "col": 3, "x": 3, "y": 0.985 },
{ "label": "F", "row": 1, "col": 4, "x": 4, "y": 1.11 },
{ "label": "G", "row": 1, "col": 5, "x": 5, "y": 1.235 },
{ "label": "H", "row": 1, "col": 7, "x": 9, "y": 1.235 },
{ "label": "J", "row": 1, "col": 8, "x": 10, "y": 1.11 },
{ "label": "K", "row": 1, "col": 9, "x": 11, "y": 0.985 },
{ "label": "L", "row": 1, "col": 10, "x": 12, "y": 1.11 },
{ "label": ";", "row": 1, "col": 11, "x": 13, "y": 1.36 },
{ "label": "'", "row": 1, "col": 12, "x": 14, "y": 1.36 },
{ "label": "LShift", "row": 2, "col": 0, "x": 0, "y": 2.36 },
{ "label": "Z", "row": 2, "col": 1, "x": 1, "y": 2.36 },
{ "label": "X", "row": 2, "col": 2, "x": 2, "y": 2.11 },
{ "label": "C", "row": 2, "col": 3, "x": 3, "y": 1.985 },
{ "label": "V", "row": 2, "col": 4, "x": 4, "y": 2.11 },
{ "label": "B", "row": 2, "col": 5, "x": 5, "y": 2.235 },
{ "label": "N", "row": 2, "col": 7, "x": 9, "y": 2.235 },
{ "label": "M", "row": 2, "col": 8, "x": 10, "y": 2.11 },
{ "label": ",", "row": 2, "col": 9, "x": 11, "y": 1.985 },
{ "label": ".", "row": 2, "col": 10, "x": 12, "y": 2.11 },
{ "label": "/", "row": 2, "col": 11, "x": 13, "y": 2.36 },
{ "label": "Esc", "row": 2, "col": 12, "x": 14, "y": 2.36 },
{ "label": "GUI", "row": 3, "col": 3, "x": 3.48, "y": 3.13 },
{ "label": "LWR", "row": 3, "col": 4, "x": 3.48, "y": 3.13, "r": 15, "rx": 3.98, "ry": 7.63 },
{ "label": "SPC", "row": 3, "col": 5, "x": 3.48, "y": 2.63, "r": 30, "rx": 3.98, "ry": 7.63, "h": 1.5 },
{ "label": "ENT", "row": 3, "col": 7, "x": 10.52, "y": 2.63, "r": -30, "rx": 11.02, "ry": 7.63, "h": 1.5 },
{ "label": "RSE", "row": 3, "col": 8, "x": 10.52, "y": 3.13, "r": -15, "rx": 11.02, "ry": 7.63 },
{ "label": "ALT", "row": 3, "col": 9, "x": 10.52, "y": 3.13 }
]
}
},
"sensors": []
}

156
config/corne.keymap Normal file
View File

@ -0,0 +1,156 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h>
// dt-formatter: indent = " "
// dt-formatter: reindentMultilineIntegerCells = "dedent"
/ {
behaviors {
llayers: llayers {
compatible = "zmk,behavior-tap-dance";
label = "LLAYERS";
#binding-cells = <0>;
bindings = <&mo 5>, <&mo 1>, <&tog 5>;
};
rlayers: rlayers {
compatible = "zmk,behavior-tap-dance";
label = "RLAYERS";
#binding-cells = <0>;
bindings = <&mo 5>;
};
lmods: lmods {
compatible = "zmk,behavior-tap-dance";
label = "LMODS";
#binding-cells = <0>;
bindings = <&sk LCTRL>, <&sk LEFT_ALT>;
};
rmods: rmods {
compatible = "zmk,behavior-tap-dance";
label = "RMODS";
#binding-cells = <0>;
bindings = <&sk RCTRL>, <&sk LEFT_META>;
};
};
combos {
compatible = "zmk,combos";
capslock {
bindings = <&kp CAPS>;
key-positions = <24 35>;
};
lctrl {
bindings = <&sk LCTRL>;
key-positions = <25 26>;
};
lmeta {
bindings = <&sk LEFT_META>;
key-positions = <26 27>;
};
lalt {
bindings = <&sk LALT>;
key-positions = <27 28>;
};
rctrl {
bindings = <&sk RCTRL>;
key-positions = <33 34>;
};
rmeta {
bindings = <&sk RIGHT_META>;
key-positions = <33 32>;
};
ralt {
bindings = <&sk RIGHT_ALT>;
key-positions = <32 31>;
};
l5 {
bindings = <&sl 5>;
key-positions = <36 40 41 37>;
};
};
macros {
};
keymap {
compatible = "zmk,keymap";
base {
bindings = <
&kp TAB &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SEMI &kp INS
&kp BACKSPACE &kp A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &kp O &kp DEL
&kp LEFT_SHIFT &kp Z &kp X &kp C &kp V &kp B &kp K &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&mo 1 &mo 2 &kp SPACE &kp ENTER &mo 3 &mo 4
>;
};
altkeypad {
bindings = <
&trans &kp MINUS &kp PLUS &kp N7 &kp N8 &kp N9 &trans &trans &trans &trans &trans &trans
&kp BSPC &kp FSLH &kp STAR &kp N4 &kp N5 &kp N6 &trans &trans &trans &trans &trans &trans
&trans &kp KP_EQUAL &kp DOT &kp N1 &kp N2 &kp N3 &trans &trans &trans &trans &trans &trans
&trans &kp N0 &kp ENTER &trans &trans &trans
>;
label = "altkeypad";
};
navigation {
bindings = <
&kp ESC &kp HOME &kp PAGE_DOWN &kp PG_UP &kp END &kp ENTER &kp KP_NUMBER_7 &kp KP_NUMBER_8 &kp KP_NUMBER_9 &kp KP_PLUS &kp KP_MINUS &trans
&kp BSPC &kp LEFT &kp UP &kp DOWN &kp RIGHT &kp DEL &kp KP_NUMBER_4 &kp KP_NUMBER_5 &kp KP_NUMBER_6 &kp KP_MULTIPLY &kp KP_DIVIDE &kp BACKSPACE
&trans &none &none &none &none &none &kp KP_NUMBER_1 &kp KP_NUMBER_2 &kp KP_NUMBER_3 &kp KP_DOT &kp KP_EQUAL &trans
&trans &trans &trans &kp ENTER &kp KP_N0 &trans
>;
label = "navigation";
};
punctuation {
bindings = <
&kp F1 &mt N1 F2 &mt N2 F3 &mt N3 F4 &mt N4 F5 &mt N5 F6 &mt N6 F7 &mt N7 F8 &mt N8 F9 &mt N9 F10 &mt N0 F11 &kp F12
&trans &kp LS(N1) &kp LS(N2) &kp LS(N3) &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp LS(N0) &trans
&trans &kp NUBS &kp PIPE &kp NUHS &kp MINUS &kp UNDER &kp LS(NUMBER_2) &kp SINGLE_QUOTE &kp DOUBLE_QUOTES &kp LEFT_BRACKET &kp RIGHT_BRACKET &trans
&trans &trans &trans &trans &trans &trans
>;
label = "punctuation";
};
altium {
bindings = <
&kp ESC &kp X &kp SPACE &kp UP &kp LS(SPACE) &kp STAR &none &none &none &none &none &none
&kp TAB &kp Y &kp LEFT &kp DOWN &kp RIGHT &kp L &none &none &none &none &none &none
&kp LEFT_SHIFT &kp LC(Z) &kp LC(X) &kp LC(C) &kp LC(V) &none &none &none &none &none &none &none
&kp LEFT_CONTROL &trans &kp RET &none &none &trans
>;
label = "altium";
};
configuration {
bindings = <
&trans &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &trans &bt BT_PRV &bt BT_CLR &bt BT_NXT &trans &kp KP_NUMLOCK &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans
>;
label = "configuration";
};
};
};

17
config/sofle.conf Normal file
View File

@ -0,0 +1,17 @@
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT
# Uncomment the following line to enable the Sofle OLED Display
# CONFIG_ZMK_DISPLAY=y
# Uncomment these two lines to add support for encoders
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Uncomment this line below to add rgb underglow / backlight support
# CONFIG_ZMK_RGB_UNDERGLOW=y
# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n

108
config/sofle.keymap Normal file
View File

@ -0,0 +1,108 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/ext_power.h>
#define BASE 0
#define LOWER 1
#define RAISE 2
#define ADJUST 3
/ {
// Activate ADJUST layer by pressing raise and lower
conditional_layers {
compatible = "zmk,conditional-layers";
adjust_layer {
if-layers = <LOWER RAISE>;
then-layer = <ADJUST>;
};
};
keymap {
compatible = "zmk,keymap";
default_layer {
label = "default";
// ------------------------------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT |
// | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI |
bindings = <
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &none
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
&kp TAB &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 C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LGUI &kp LALT &kp LCTRL &mo LOWER &kp RET &kp SPACE &mo RAISE &kp RCTRL &kp RALT &kp RGUI
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
lower_layer {
label = "lower";
// TODO: Some binds are waiting for shifted keycode support.
// ------------------------------------------------------------------------------------------------------------
// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | |
// | | | | | | | | | | | |
bindings = <
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F12
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp PIPE
&trans &kp EQUAL &kp MINUS &kp KP_PLUS &kp LBRC &kp RBRC &trans &trans &kp LBKT &kp RBKT &kp SEMI &kp COLON &kp BSLH &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
raise_layer {
label = "raise";
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | |
// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC |
// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | |
// | | | | | | | | | | | |
bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &trans &trans &trans &trans &trans &trans
&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans
&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC
&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
};
adjust_layer {
// ----------------------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | |
// | | RGB_BRD | RGB_BRI | | | | | | | | | | |
// | | | | | | | RGB_TOG | | | | | | | | |
// | | | | | | | | | | | |
label = "adjust";
bindings = <
&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 &none &none &none &none
&ext_power EP_TOG &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_EFF &none &none &none &none &none &none
&none &rgb_ug RGB_BRD &rgb_ug RGB_BRI &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &rgb_ug RGB_TOG &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none
>;
};
};
};

11
config/west.yml Normal file
View File

@ -0,0 +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