2024-10-05 22:05:01 +00:00
|
|
|
/*
|
|
|
|
* 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/ext_power.h>
|
|
|
|
#include <dt-bindings/zmk/outputs.h>
|
|
|
|
#include <dt-bindings/zmk/rgb.h>
|
|
|
|
|
|
|
|
#define HYPER LC(LS(LG(LALT)))
|
|
|
|
|
|
|
|
// layers
|
|
|
|
#define DEFAULT 0
|
|
|
|
#define LOWER 1
|
|
|
|
#define MAGIC 2
|
2024-12-02 01:17:43 +00:00
|
|
|
#define SYMBOLS 3
|
2024-10-05 22:05:01 +00:00
|
|
|
|
|
|
|
/ {
|
|
|
|
behaviors {
|
|
|
|
// For the "layer" key, it'd nice to be able to use it as either a shift or a toggle.
|
|
|
|
// Configure it as a tap dance, so the first tap (or hold) is a &mo and the second tap is a &to
|
|
|
|
layer_td: tap_dance_0 {
|
|
|
|
compatible = "zmk,behavior-tap-dance";
|
|
|
|
label = "LAYER_TAP_DANCE";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
tapping-term-ms = <200>;
|
|
|
|
bindings = <&mo LOWER>, <&to LOWER>;
|
|
|
|
};
|
|
|
|
|
|
|
|
magic: magic_hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "MAGIC_HOLD_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
|
|
|
tapping-term-ms = <200>;
|
|
|
|
bindings = <&mo>, <&rgb_ug_status_macro>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
macros {
|
|
|
|
rgb_ug_status_macro: rgb_ug_status_macro_0 {
|
|
|
|
label = "RGB_UG_STATUS";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings
|
|
|
|
= <&rgb_ug RGB_STATUS>;
|
|
|
|
};
|
|
|
|
|
|
|
|
bt_0: bt_profile_macro_0 {
|
|
|
|
label = "BT_0";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings
|
|
|
|
= <&out OUT_BLE>,
|
|
|
|
<&bt BT_SEL 0>;
|
|
|
|
};
|
|
|
|
|
|
|
|
bt_1: bt_profile_macro_1 {
|
|
|
|
label = "BT_1";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings
|
|
|
|
= <&out OUT_BLE>,
|
|
|
|
<&bt BT_SEL 1>;
|
|
|
|
};
|
|
|
|
|
|
|
|
bt_2: bt_profile_macro_2 {
|
|
|
|
label = "BT_2";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings
|
|
|
|
= <&out OUT_BLE>,
|
|
|
|
<&bt BT_SEL 2>;
|
|
|
|
};
|
|
|
|
|
|
|
|
bt_3: bt_profile_macro_3 {
|
|
|
|
label = "BT_3";
|
|
|
|
compatible = "zmk,behavior-macro";
|
|
|
|
#binding-cells = <0>;
|
|
|
|
bindings
|
|
|
|
= <&out OUT_BLE>,
|
|
|
|
<&bt BT_SEL 3>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
|
|
|
|
|
|
|
default_layer {
|
2024-11-30 01:13:31 +00:00
|
|
|
// --------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
// | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 |
|
|
|
|
// | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | # |
|
|
|
|
// | ` | Q | W | E | R | T | | Y | U | I | O | P | - |
|
|
|
|
// | ESC | A | S | D | F | G | | H | J | K | L | ; | ' |
|
|
|
|
// | LSHFT | Z | X | C | V | B | ESC | UP | DOWN | | LEFT | RIGHT | ENTER | N | M | , | . | / | RSHFT |
|
|
|
|
// | MAGIC | HOME | PGUP | PGDN | END | | BSPC | DEL | TBD | | TBD | TAB | SPACE | | [ | ( | ) | ] | MAGIC |
|
2024-10-05 22:05:01 +00:00
|
|
|
|
|
|
|
bindings = <
|
2024-11-30 01:13:31 +00:00
|
|
|
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
|
|
|
|
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSLH
|
|
|
|
&kp GRAVE &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp MINUS
|
|
|
|
&caps_word &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
2024-12-02 01:17:43 +00:00
|
|
|
&kp LSHFT &mt LCTRL Z &kp X &kp C &kp V &kp B &kp ESC &kp UP &kp DOWN &kp LEFT &kp RIGHT &kp RET &kp N &kp M &kp COMMA &kp DOT &kp FSLH &mo SYMBOLS
|
2024-11-30 01:13:31 +00:00
|
|
|
&magic MAGIC 0 &kp HOME &kp END &kp LEFT &kp RIGHT &kp BSPC &kp DEL &none &none &kp TAB < SYMBOLS SPACE &kp LPAR &kp LBKT &kp RBKT &kp RPAR &magic MAGIC 0
|
2024-10-05 22:05:01 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
lower_layer {
|
|
|
|
bindings = <
|
2024-11-30 01:13:31 +00:00
|
|
|
&kp C_BRI_DN &kp C_BRI_UP &kp C_PREV &kp C_NEXT &kp C_PP &kp C_MUTE &kp C_VOL_DN &kp C_VOL_UP &none &kp PAUSE_BREAK
|
|
|
|
&trans &none &none &none &none &kp HOME &kp LPAR &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp PSCRN
|
|
|
|
&trans &none &none &kp UP &none &kp END &kp RPAR &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp SLCK
|
|
|
|
&trans &none &kp LEFT &kp DOWN &kp RIGHT &kp PG_UP &kp PRCNT &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &none
|
|
|
|
&trans &kp K_CMENU &none &kp F11 &kp F12 &kp PG_DN &trans &trans &to DEFAULT &trans &trans &trans &kp COMMA &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &trans
|
|
|
|
&trans &kp CAPS &kp INS &kp F11 &kp F12 &trans &trans &trans &trans &trans &trans &kp KP_N0 &kp KP_N0 &kp KP_DOT &kp KP_ENTER &trans
|
2024-10-05 22:05:01 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
magic_layer {
|
|
|
|
bindings = <
|
2024-11-30 01:13:31 +00:00
|
|
|
&bt BT_CLR &none &none &none &none &none &none &none &none &bt BT_CLR_ALL
|
|
|
|
&none &none &none &none &none &none &none &none &none &none &none &none
|
|
|
|
&none &rgb_ug RGB_SPI &rgb_ug RGB_SAI &rgb_ug RGB_HUI &rgb_ug RGB_BRI &rgb_ug RGB_TOG &none &none &none &none &none &none
|
|
|
|
&bootloader &rgb_ug RGB_SPD &rgb_ug RGB_SAD &rgb_ug RGB_HUD &rgb_ug RGB_BRD &rgb_ug RGB_EFF &none &none &none &none &none &bootloader
|
|
|
|
&sys_reset &none &none &none &none &none &bt_2 &bt_3 &none &none &none &none &none &none &none &none &none &sys_reset
|
|
|
|
&none &none &none &none &none &bt_0 &bt_1 &out OUT_USB &none &none &none &none &none &none &none &none
|
2024-10-05 22:05:01 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2024-12-02 01:17:43 +00:00
|
|
|
// --------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
// | | | | | | | | | | | |
|
|
|
|
// | | ` | ( | ) | ; | , | | | | | | |
|
|
|
|
// | ! | { | ' | " | } | ? | | | | | | | |
|
|
|
|
// | # | ^ | = | _ | $ | * | | | | | | | |
|
|
|
|
// | @ | < | | | - | > | / | \ | . | * | | | | | | | | | | |
|
|
|
|
// | ~ | & | [ | ] | + | | % | : | ; | | | | | | | | | | |
|
|
|
|
|
|
|
|
symbols_layer {
|
2024-10-05 22:05:01 +00:00
|
|
|
bindings = <
|
2024-12-02 01:17:43 +00:00
|
|
|
&none &none &none &none &none &none &none &none &none &none
|
|
|
|
&none &kp GRAVE &kp LPAR &kp RPAR &kp SEMI &kp COMMA &none &none &none &none &none &none
|
|
|
|
&kp EXCL &kp LBRC &kp SQT &kp LS(N2) &kp RBRC &kp QMARK &kp SEMI &none &none &none &none &none
|
|
|
|
&kp BSLH &kp CARET &kp EQUAL &kp UNDER &kp DLLR &kp STAR &kp DOT &kp BSPC &kp TAB &kp SPACE &kp RET &none
|
|
|
|
&kp LS(SQT) &kp LT &kp LS(NON_US_BSLH) &kp MINUS &kp GT &kp FSLH &kp NON_US_BSLH &kp DOT &kp STAR &none &none &none &kp FSLH &kp DEL &kp LS(TAB) &none &none &none
|
|
|
|
&kp LS(NON_US_HASH) &kp LS(N7) &kp LBKT &kp RBKT &kp PLUS &kp PRCNT &kp COLON &kp SEMI &none &none &none &trans &trans &trans &trans &none
|
2024-10-05 22:05:01 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|