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

Merge branch 'main' of github.com:tcaxle/zmk-config
Some checks failed
/ build (push) Failing after 0s

This commit is contained in:
Charlie Crossley 2023-10-26 10:02:38 +01:00
commit 1d26193f8e
3 changed files with 254 additions and 72 deletions

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# zmk-config
Configurator GUI:
https://nickcoutsos.github.io/keymap-editor/

93
config/sofle.json Normal file
View File

@ -0,0 +1,93 @@
{
"id": "sofle",
"name": "Sofle",
"layouts": {
"default_transform": {
"name": "default_transform",
"layout": [
{ "row": 0, "col": 0, "r": 0, "x": 0, "y": 0.6 },
{ "row": 0, "col": 1, "r": 0, "x": 1, "y": 0.6 },
{ "row": 0, "col": 2, "r": 0, "x": 2, "y": 0.13 },
{ "row": 0, "col": 3, "r": 0, "x": 3, "y": 0 },
{ "row": 0, "col": 4, "r": 0, "x": 4, "y": 0.13 },
{ "row": 0, "col": 5, "r": 0, "x": 5, "y": 0.26 },
{ "row": 0, "col": 9, "r": 0, "x": 9.51, "y": 0.26 },
{ "row": 0, "col": 10, "r": 0, "x": 10.51, "y": 0.13 },
{ "row": 0, "col": 11, "r": 0, "x": 11.51, "y": 0 },
{ "row": 0, "col": 12, "r": 0, "x": 12.51, "y": 0.13 },
{ "row": 0, "col": 13, "r": 0, "x": 13.51, "y": 0.6 },
{ "row": 0, "col": 14, "r": 0, "x": 14.51, "y": 0.6 },
{ "row": 1, "col": 0, "r": 0, "x": 0, "y": 1.6 },
{ "row": 1, "col": 1, "r": 0, "x": 1, "y": 1.6 },
{ "row": 1, "col": 2, "r": 0, "x": 2, "y": 1.13 },
{ "row": 1, "col": 3, "r": 0, "x": 3, "y": 1 },
{ "row": 1, "col": 4, "r": 0, "x": 4, "y": 1.14 },
{ "row": 1, "col": 5, "r": 0, "x": 5, "y": 1.27 },
{ "row": 1, "col": 9, "r": 0, "x": 9.51, "y": 1.27 },
{ "row": 1, "col": 10, "r": 0, "x": 10.51, "y": 1.14 },
{ "row": 1, "col": 11, "r": 0, "x": 11.51, "y": 1 },
{ "row": 1, "col": 12, "r": 0, "x": 12.51, "y": 1.13 },
{ "row": 1, "col": 13, "r": 0, "x": 13.51, "y": 1.6 },
{ "row": 1, "col": 14, "r": 0, "x": 14.51, "y": 1.6 },
{ "row": 2, "col": 0, "r": 0, "x": 0, "y": 2.61 },
{ "row": 2, "col": 1, "r": 0, "x": 1, "y": 2.61 },
{ "row": 2, "col": 2, "r": 0, "x": 2, "y": 2.14 },
{ "row": 2, "col": 3, "r": 0, "x": 3, "y": 2.01 },
{ "row": 2, "col": 4, "r": 0, "x": 4, "y": 2.14 },
{ "row": 2, "col": 5, "r": 0, "x": 5, "y": 2.27 },
{ "row": 2, "col": 9, "r": 0, "x": 9.51, "y": 2.27 },
{ "row": 2, "col": 10, "r": 0, "x": 10.51, "y": 2.14 },
{ "row": 2, "col": 11, "r": 0, "x": 11.51, "y": 2.01 },
{ "row": 2, "col": 12, "r": 0, "x": 12.51, "y": 2.14 },
{ "row": 2, "col": 13, "r": 0, "x": 13.51, "y": 2.61 },
{ "row": 2, "col": 14, "r": 0, "x": 14.51, "y": 2.61 },
{ "row": 3, "col": 0, "r": 0, "x": 0, "y": 3.61 },
{ "row": 3, "col": 1, "r": 0, "x": 1, "y": 3.61 },
{ "row": 3, "col": 2, "r": 0, "x": 2, "y": 3.14 },
{ "row": 3, "col": 3, "r": 0, "x": 3, "y": 3.01 },
{ "row": 3, "col": 4, "r": 0, "x": 4, "y": 3.14 },
{ "row": 3, "col": 5, "r": 0, "x": 5, "y": 3.27 },
{ "row": 3, "col": 6, "r": 0, "x": 6.12, "y": 3.24 },
{ "row": 3, "col": 8, "r": 0, "x": 8.39, "y": 3.24 },
{ "row": 3, "col": 9, "r": 0, "x": 9.51, "y": 3.27 },
{ "row": 3, "col": 10, "r": 0, "x": 10.51, "y": 3.14 },
{ "row": 3, "col": 11, "r": 0, "x": 11.51, "y": 3.01 },
{ "row": 3, "col": 12, "r": 0, "x": 12.51, "y": 3.14 },
{ "row": 3, "col": 13, "r": 0, "x": 13.51, "y": 3.61 },
{ "row": 3, "col": 14, "r": 0, "x": 14.51, "y": 3.61 },
{ "row": 4, "col": 2, "r": 0, "x": 2, "y": 4.14 },
{ "row": 4, "col": 3, "r": 0, "x": 3, "y": 4.01 },
{ "row": 4, "col": 4, "r": 0, "x": 4, "y": 4.15 },
{ "row": 4, "col": 5, "r": 23, "x": 5.16, "y": 4.39, "rx": 5.66, "ry": 4.89 },
{ "row": 4, "col": 6, "r": 30, "x": 6.26, "y": 4.4, "rx": 6.76, "ry": 5.15, "h": 1.5 },
{ "row": 4, "col": 8, "r": -30, "x": 8.26, "y": 4.4, "rx": 8.76, "ry": 5.15, "h": 1.5 },
{ "row": 4, "col": 9, "r": -23, "x": 9.36, "y": 4.39, "rx": 9.86, "ry": 4.89 },
{ "row": 4, "col": 10, "r": 0, "x": 10.51, "y": 4.15 },
{ "row": 4, "col": 11, "r": 0, "x": 11.51, "y": 4.01 },
{ "row": 4, "col": 12, "r": 0, "x": 12.51, "y": 4.14 }
]
}
},
"sensors": [
{
"ref": "left_encoder",
"name": "encoder_left",
"identifier": "encoder_left",
"compatible": "alps,ec11",
"label": "LEFT_ENCODER",
"enabled": false
},
{
"ref": "right_encoder",
"name": "encoder_right",
"identifier": "encoder_right",
"compatible": "alps,ec11",
"label": "RIGHT_ENCODER",
"enabled": false
}
]
}

View File

@ -5,10 +5,10 @@
*/
#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>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/rgb.h>
#define BASE 0
#define LOWER 1
@ -16,93 +16,178 @@
#define ADJUST 3
/ {
// Activate ADJUST layer by pressing raise and lower
// Activate ADJUST layer by pressing raise and lower
conditional_layers {
compatible = "zmk,conditional-layers";
adjust_layer {
if-layers = <LOWER RAISE>;
then-layer = <ADJUST>;
both-mod {
if-layers = <1 3>;
then-layer = <3>;
};
};
behaviors {
macro_mirror: macro_mirror {
compatible = "zmk,behavior-tap-dance";
label = "MACRO_MIRROR";
#binding-cells = <0>;
bindings = <&sl 5>, <&tog 8>;
};
};
combos {
compatible = "zmk,combos";
macro {
bindings = <&macro_mirror>;
key-positions = <50 51 52>;
};
qwerty {
bindings = <&tog 6>;
key-positions = <57 58 59>;
};
left-space {
bindings = <&kp SPACE>;
key-positions = <39 40>;
};
};
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 |
base {
label = "base";
// ------------------------------------------------------------------------------------------------------------
// | ` | 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
&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 F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SEMI &none
&kp BSPC &kp A &kp R &kp S &kp T &kp D &kp H &kp N &kp E &kp I &kp O &kp DEL
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &tog 4 &kp K_MUTE &kp K &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
&kp LCTRL &kp LEFT_WIN &kp LALT &mo 1 &kp RET &kp SPACE &mo 2 &kp RALT &kp RIGHT_WIN &kp RIGHT_CONTROL
>;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
sensor-bindings =
<&inc_dec_kp UP_ARROW DOWN_ARROW>,
<&inc_dec_kp C_VOL_UP C_VOL_UP>;
};
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 |
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | |
// | | | | | | | | | | | |
left-mod {
label = "left-mod";
// 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
&trans &trans &trans &trans &trans &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6
&trans &kp KP_DIVIDE &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MULTIPLY &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&kp DELETE &kp KP_SUBTRACT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp PG_UP &kp HOME &kp UP &kp END &trans &kp BACKSPACE
&trans &kp KP_N0 &kp KP_N1 &kp KP_NUMBER_2 &kp KP_N3 &kp KP_DOT &trans &trans &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &trans &trans
&trans &trans &trans &tog 1 &trans &trans &trans &trans &trans &trans
>;
};
right-mod {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &kp LBKT &kp RBKT &kp MINUS &kp EQUAL &trans
&kp DEL &trans &trans &trans &trans &trans &trans &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &kp SQT &kp NON_US_HASH &kp BSPC
&trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LBRC &kp RIGHT_BRACE &kp PIPE &kp NON_US_BACKSLASH &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
label = "right-mod";
};
both-mod {
// ----------------------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | |
// | | RGB_BRD | RGB_BRI | | | | | | | | | | |
// | | | | | | | RGB_TOG | | | | | | | | |
// | | | | | | | | | | | |
label = "both-mod";
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
>;
};
encoder-alt {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
sensor-bindings = <&inc_dec_kp UP_ARROW DOWN>;
label = "encoder-alt";
};
macro {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
label = "macro";
};
qwerty {
bindings = <
&trans &trans &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 &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &trans
&trans &kp Z &kp X &kp C &kp V &kp B &trans &trans &kp N &kp M &kp COMMA &kp DOT &kp FSLH &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
label = "qwerty";
};
mirror-mod {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &mo 8 &trans &trans &trans &trans &trans &trans
>;
label = "mirror-mod";
};
mirror {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&trans &kp SEMI &kp Y &kp U &kp L &kp J &trans &trans &trans &trans &trans &trans
&kp DEL &kp O &kp I &kp E &kp N &kp H &trans &trans &trans &trans &trans &trans
&trans &kp FSLH &kp DOT &kp COMMA &kp M &kp K &trans &trans &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
>;
};
};
};