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

progress on sofle...

This commit is contained in:
keymap-editor[bot] 2023-10-17 14:02:35 +00:00 committed by GitHub
parent 445e2abfec
commit ecbd66c5bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 218 additions and 65 deletions

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 <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/ext_power.h> #include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/rgb.h>
#define BASE 0 #define BASE 0
#define LOWER 1 #define LOWER 1
@ -16,40 +16,69 @@
#define ADJUST 3 #define ADJUST 3
/ { / {
// Activate ADJUST layer by pressing raise and lower // Activate ADJUST layer by pressing raise and lower
conditional_layers { conditional_layers {
compatible = "zmk,conditional-layers"; compatible = "zmk,conditional-layers";
adjust_layer { adjust_layer {
if-layers = <LOWER RAISE>; if-layers = <2 4>;
then-layer = <ADJUST>; then-layer = <5>;
};
};
behaviors {
htog: htog {
compatible = "zmk,behavior-hold-tap";
label = "HTOG";
bindings = <&mo>, <&tog>;
#binding-cells = <2>;
tapping-term-ms = <300>;
}; };
}; };
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
default_layer { base {
label = "default"; label = "base";
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------
// | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | // | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
// | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC | // | ESC | Q | W | E | R | T | | Y | U | I | O | P | BKSPC |
// | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | // | TAB | A | S | D | F | G | | H | J | K | L | ; | ' |
// | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT | // | SHIFT | Z | X | C | V | B | MUTE | | | N | M | , | . | / | SHIFT |
// | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI | // | GUI | ALT | CTRL | LOWER| ENTER | | SPACE | RAISE| CTRL | ALT | GUI |
bindings = < 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 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 ESC &kp Q &kp W &kp F &kp P &kp G &kp J &kp L &kp U &kp Y &kp SEMI &none
&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 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 &kp C_MUTE &none &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &trans &kp K_MUTE &kp K &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 LCTRL &kp LEFT_WIN &kp LALT &htog 1 2 &kp RET &kp SPACE &mo 4 &kp RALT &kp RIGHT_WIN &kp RCTRL
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; sensor-bindings =
<&inc_dec_kp C_AC_SCROLL_UP C_AC_SCROLL_DOWN>,
<&inc_dec_kp C_VOLUME_UP C_VOL_DN>;
}; };
lower_layer { mirror {
label = "lower"; bindings = <
&trans &kp N0 &kp N9 &kp N8 &kp N7 &kp N6 &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
>;
label = "mirror";
};
left-keypad {
label = "left-keypad";
// TODO: Some binds are waiting for shifted keycode support. // TODO: Some binds are waiting for shifted keycode support.
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------
// | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | // | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
@ -57,44 +86,62 @@
// | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | // | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | |
// | | = | - | + | { | } | | | | [ | ] | ; | : | \ | | // | | = | - | + | { | } | | | | [ | ] | ; | : | \ | |
// | | | | | | | | | | | | // | | | | | | | | | | | |
bindings = < 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 F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp F12 &kp GRAVE &kp KP_DIVIDE &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MULTIPLY &none &none &none &kp LEFT_PARENTHESIS &kp RIGHT_PARENTHESIS &none
&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp PIPE &kp DELETE &kp KP_SUBTRACT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none &none &none &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp BACKSPACE
&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 &lt 6 LSHIFT &kp KP_N0 &kp KP_N1 &kp KP_NUMBER_2 &kp KP_N3 &kp KP_DOT &tog 3 &none &none &kp PG_DN &kp UP &kp PG_UP &kp BSLH &none
&none &none &none &tog 2 &trans &trans &none &kp LEFT &kp DOWN &kp RIGHT
>;
sensor-bindings =
<&inc_dec_kp RIGHT LEFT>,
<&inc_dec_kp PG_UP PG_DN>;
};
alt-encoder-nav {
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 &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>; sensor-bindings = <&inc_dec_kp UP_ARROW DOWN>;
}; };
raise_layer { right-mod {
label = "raise"; label = "right-mod";
// ------------------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | | INS | PSCR | GUI | | | | PGUP | | ^ | | | | // | | INS | PSCR | GUI | | | | PGUP | | ^ | | | |
// | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC | // | | ALT | CTRL | SHIFT | | CAPS | | PGDN | <- | v | -> | DEL | BKSPC |
// | | UNDO | CUT | COPY | PASTE | | | | | | | | | | | // | | UNDO | CUT | COPY | PASTE | | | | | | | | | | |
// | | | | | | | | | | | | // | | | | | | | | | | | |
bindings = < 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 &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
&trans &kp INS &kp PSCRN &kp K_CMENU &trans &trans &kp PG_UP &trans &kp UP &trans &kp N0 &trans &none &kp INS &kp PSCRN &kp K_CMENU &none &none &none &none &none &none &none &none
&trans &kp LALT &kp LCTRL &kp LSHFT &trans &kp CLCK &kp PG_DN &kp LEFT &kp DOWN &kp RIGHT &kp DEL &kp BSPC &kp DELETE &kp LALT &kp LCTRL &kp LSHFT &none &kp CLCK &none &none &none &none &none &kp BSPC
&trans &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &trans &trans &trans &trans &trans &trans &trans &trans &trans &none &kp K_UNDO &kp K_CUT &kp K_COPY &kp K_PASTE &none &none &none &none &none &none &none &none &none
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &none &none &none &none &none &none &none &none &none &none
>; >;
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>; sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
}; };
adjust_layer { both-mod {
// ---------------------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | | // | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | | // | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | |
// | | RGB_BRD | RGB_BRI | | | | | | | | | | | // | | RGB_BRD | RGB_BRI | | | | | | | | | | |
// | | | | | | | RGB_TOG | | | | | | | | | // | | | | | | | RGB_TOG | | | | | | | | |
// | | | | | | | | | | | | // | | | | | | | | | | | |
label = "adjust";
label = "both-mod";
bindings = < 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 &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 &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
@ -102,7 +149,20 @@
&none &none &none &none &none &none &rgb_ug RGB_TOG &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 &none &none &none &none &none &none &none &none &none &none
>; >;
sensor-bindings = <&inc_dec_kp 0 0>;
}; };
layer_4 {
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &kp PG_UP &kp UP_ARROW &kp PG_DN &none &none &none &none &none &none &none
&none &kp HOME &kp UP &kp DOWN &kp RIGHT &kp END &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
>;
sensor-bindings = <&inc_dec_kp UP_ARROW DOWN>;
};
}; };
}; };