1
0
mirror of https://github.com/tcaxle/zmk-config.git synced 2026-04-21 21:07:25 +01:00

Compare commits

...

10 Commits

Author SHA1 Message Date
keymap-editor[bot]
7803939878 remove right encoder alt 2023-10-29 20:31:02 +00:00
keymap-editor[bot]
f268bf3339 right-encoder-alt to scroll 2023-10-29 20:29:34 +00:00
keymap-editor[bot]
4805af0535 simplified. 2023-10-29 20:15:48 +00:00
keymap-editor[bot]
44bf02c174 fix mute 2023-10-29 19:49:52 +00:00
XLE
931eadbd5c Update sofle.keymap 2023-10-29 19:44:07 +00:00
keymap-editor[bot]
bb503d5ce2 fix encoder mapping 2023-10-29 19:39:54 +00:00
XLE
ca7c039b3e Update sofle.conf 2023-10-29 19:31:24 +00:00
keymap-editor[bot]
09b308e4e2 fixed base layer 2023-10-29 19:30:07 +00:00
keymap-editor[bot]
98dd558521 updated mirror layer 2023-10-29 19:11:59 +00:00
keymap-editor[bot]
1615d83b70 fixed mirror layer 2023-10-29 19:00:16 +00:00
2 changed files with 54 additions and 81 deletions

View File

@@ -2,11 +2,11 @@
# SPDX-License-Identifier: MIT
# Uncomment the following line to enable the Sofle OLED Display
# CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_DISPLAY=y
# Uncomment these two lines to add support for encoders
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
# Uncomment this line below to add rgb underglow / backlight support
# CONFIG_ZMK_RGB_UNDERGLOW=y

View File

@@ -5,10 +5,7 @@
*/
#include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.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
@@ -18,40 +15,50 @@
/ {
// Activate ADJUST layer by pressing raise and lower
left_encoder: encoder_left {
compatible = "alps,ec11";
label = "LEFT_ENCODER";
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
};
right_encoder: encoder_right {
compatible = "alps,ec11";
label = "RIGHT_ENCODER";
a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
steps = <80>;
};
sensors {
compatible = "zmk,keymap-sensors";
sensors = <&left_encoder &right_encoder>;
triggers-per-rotation = <20>;
};
conditional_layers {
compatible = "zmk,conditional-layers";
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>;
bindings = <&sl 3>;
key-positions = <50 51 52>;
};
qwerty {
bindings = <&tog 6>;
bindings = <&tog 4>;
key-positions = <57 58 59>;
};
left-space {
bindings = <&kp SPACE>;
key-positions = <39 40>;
conf {
bindings = <&sl 2>;
key-positions = <53 56>;
};
};
@@ -69,20 +76,20 @@
// | 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 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
&kp ESCAPE &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 F &kp P &kp G &kp J &kp L &kp U &kp Y &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 &tog 5 &kp C_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 1 &kp RALT &kp RIGHT_WIN &kp RIGHT_CONTROL
>;
sensor-bindings =
<&inc_dec_kp UP_ARROW DOWN_ARROW>,
<&inc_dec_kp C_VOL_UP C_VOL_UP>;
<&inc_dec_kp UP_ARROW DOWN>,
<&inc_dec_kp C_VOL_UP C_VOL_DN>;
};
left-mod {
label = "left-mod";
mod {
label = "mod";
// TODO: Some binds are waiting for shifted keycode support.
// ------------------------------------------------------------------------------------------------------------
@@ -93,27 +100,15 @@
// | | | | | | | | | | | |
bindings = <
&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
&kp GRAVE &trans &trans &trans &trans &trans &trans &trans &trans &kp LEFT_BRACKET &kp RIGHT_BRACKET &kp EQUAL
&kp KP_NUMLOCK &kp KP_DIVIDE &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MULTIPLY &trans &trans &trans &trans &trans &kp NON_US_HASH
&kp DELETE &kp KP_SUBTRACT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp HOME &kp PG_UP &kp UP &kp PG_DN &kp INS &kp BACKSPACE
&trans &kp KP_N0 &kp KP_N1 &kp KP_NUMBER_2 &kp KP_N3 &kp KP_DOT &trans &trans &kp END &kp LEFT &kp DOWN &kp RIGHT &kp BSLH &trans
&trans &trans &trans &trans &kp SPACE &kp ENTER &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 {
conf {
// ----------------------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 | BT3 | BT4 | BT5 | | | | | | | |
// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF | | | | | | | |
@@ -121,29 +116,16 @@
// | | | | | | | RGB_TOG | | | | | | | | |
// | | | | | | | | | | | |
label = "both-mod";
label = "conf";
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 &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11
&trans &trans &trans &trans &trans &trans &none &none &none &none &none &kp F12
&none &trans &trans &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &trans &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
@@ -168,26 +150,17 @@
label = "qwerty";
};
mirror-mod {
left-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 &mo 8 &trans &trans &trans &trans &trans &trans
&trans &trans &trans &trans &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
>;
sensor-bindings = <&inc_dec_kp LEFT_ARROW RIGHT_ARROW>;
label = "left-encoder-alt";
};
};
};