Copy my Atreus' QMK layout

This commit is contained in:
Cat /dev/Nulo 2022-06-11 14:22:29 -03:00
parent b529d191f2
commit 10d1805cc9

View file

@ -1,40 +1,27 @@
/* /*
* Copyright (c) 2021 The ZMK Contributors * Copyright (c) 2021 The ZMK Contributors
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
*/ */
#include <behaviors.dtsi> #include <behaviors.dtsi>
#include <dt-bindings/zmk/bt.h> #include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/keys.h> #include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/outputs.h>
&sk {
release-after-ms = <750>;
quick-release;
};
&caps_word { &caps_word {
continue-list = <UNDERSCORE MINUS BSPC>; continue-list = <UNDERSCORE MINUS BSPC>;
}; };
#define RSTHD_L 0 #define BASE_L 0
#define NUM_L 1 #define SYM_L 1
#define SYM_L 2 #define NAV_L 2
#define NAV_L 3 #define NUM_L 3
#define FUN_L 4
#define MY_PSCRN LS(LC(PSCRN))
#define MY_COPY LC(INSERT)
#define MY_PASTE LS(INSERT)
#define VI_U LC(Z)
#define VI_W LC(RIGHT)
#define VI_B LC(LEFT)
/ { / {
combos { combos {
compatible = "zmk,combos"; compatible = "zmk,combos";
// shortcut
#define COMBO(NAME, BINDINGS, KEYPOS, TIMEOUT) \ #define COMBO(NAME, BINDINGS, KEYPOS, TIMEOUT) \
combo_##NAME { \ combo_##NAME { \
timeout-ms = <TIMEOUT>; \ timeout-ms = <TIMEOUT>; \
@ -51,21 +38,21 @@
╰───────╮ 30 31 32 │ │ 33 34 35 ╭───────╯ ╰───────╮ 30 31 32 │ │ 33 34 35 ╭───────╯
╰────────────╯ ╰────────────╯ */ ╰────────────╯ ╰────────────╯ */
COMBO(caps_word_right, &caps_word, 26 27, 60) //COMBO(caps_word_right, &caps_word, 26 27, 60)
COMBO(caps_word_left, &caps_word, 22 23, 60) //COMBO(caps_word_left, &caps_word, 22 23, 60)
COMBO(colon, &kp COLON, 7 8, 60) //COMBO(colon, &kp COLON, 7 8, 60)
COMBO(semicolon, &kp SEMI, 27 28, 60) //COMBO(semicolon, &kp SEMI, 27 28, 60)
COMBO(slash, &kp FSLH, 1 2, 60) //COMBO(slash, &kp FSLH, 1 2, 60)
COMBO(minus, &kp MINUS, 31 32, 100) //COMBO(minus, &kp MINUS, 31 32, 100)
COMBO(underscore, &kp UNDER, 33 34, 100) //COMBO(underscore, &kp UNDER, 33 34, 100)
COMBO(equal, &kp EQUAL, 12 23, 100) //COMBO(equal, &kp EQUAL, 12 23, 100)
COMBO(enter, &kp ENTER, 17 26, 60) //COMBO(enter, &kp ENTER, 17 26, 60)
COMBO(reset_left, &bootloader, 0 1 2 3, 100) COMBO(reset_left, &bootloader, 0 1 2 3, 100)
// COMBO(reset_right, &bootloader, 6 7 8 9, 100) COMBO(reset_right, &bootloader, 6 7 8 9, 100)
}; };
behaviors { behaviors {
@ -74,7 +61,7 @@
label = "LEFT_POSITIONAL_HOLD_TAP"; label = "LEFT_POSITIONAL_HOLD_TAP";
#binding-cells = <2>; #binding-cells = <2>;
flavor = "tap-preferred"; flavor = "tap-preferred";
tapping-term-ms = <200>; tapping-term-ms = <175>;
quick-tap-ms = <125>; quick-tap-ms = <125>;
global-quick-tap; global-quick-tap;
bindings = <&kp>, <&kp>; bindings = <&kp>, <&kp>;
@ -87,7 +74,7 @@
label = "RIGHT_POSITIONAL_HOLD_TAP"; label = "RIGHT_POSITIONAL_HOLD_TAP";
#binding-cells = <2>; #binding-cells = <2>;
flavor = "tap-preferred"; flavor = "tap-preferred";
tapping-term-ms = <200>; tapping-term-ms = <175>;
quick-tap-ms = <125>; quick-tap-ms = <125>;
global-quick-tap; global-quick-tap;
bindings = <&kp>, <&kp>; bindings = <&kp>, <&kp>;
@ -106,55 +93,52 @@
bindings = <&mo>, <&kp>; bindings = <&mo>, <&kp>;
}; };
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <NAV_L SYM_L>;
then-layer = <NUM_L>;
};
};
}; };
keymap { keymap {
compatible = "zmk,keymap"; compatible = "zmk,keymap";
// RSTHD base_layer {
rsthd_layer { bindings = <
bindings = < &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&kp Z &kp C &kp Y &kp F &kp P &kp X &kp M &kp APOS &kp U &kp Q &lhm LSHFT A &lhm LALT S &lhm LCTRL D &lhm LGUI F &lhm RALT G &rhm RALT H &rhm LGUI J &rhm LCTRL K &rhm LALT L &rhm LSHFT SEMI
&lhm LALT R &lhm LSHFT S &lhm LCTRL T &lhm LGUI H &kp D &kp L &rhm LGUI N &rhm LCTRL A &rhm LSHFT I &rhm LALT O &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SINGLE_QUOTE
&sk LSHIFT &kp V &kp G &kp K &kp B &kp W &kp J &kp COMMA &key_repeat &sk LSHIFT &mo NAV_L &kp LSHFT &none &none &kp SPACE &mo SYM_L
/*& &*/ &kp ESC &base_lt NAV_L SPC &base_lt SYM_L TAB &base_lt SYM_L BSPC &base_lt NUM_L E &base_lt FUN_L DOT /* & &*/ >;
>; };
};
num_layer { sym_layer {
bindings = < bindings = <
&trans &kp LT &kp MINUS &kp GT &trans &trans &trans &kp EQUAL &trans &trans &kp ESC &kp LBKT &kp LBRC &kp LPAR &kp TILDE &kp CARET &kp RPAR &kp RBRC &kp RBKT &kp GRAVE
&lhm LALT N3 &lhm LSHFT N2 &lhm LCTRL N1 &lhm LGUI N0 &kp N4 &kp N5 &rhm LGUI N6 &rhm LCTRL N7 &rhm LSHFT N8 &rhm LALT N9 &kp MINUS &kp STAR &kp EQUAL &kp UNDERSCORE &kp DOLLAR &rhm RALT HASH &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
&kp FSLH &kp PLUS &kp CARET &kp STAR &trans &trans &trans &kp COMMA &kp DOT &trans &kp PLUS &kp PIPE &kp AT &kp SLASH &kp PERCENT &kp AMPERSAND &kp BACKSLASH &kp RA(SLASH) &kp QUESTION &kp EXCLAMATION
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/ &trans &trans &trans &trans &trans &trans
>; >;
}; };
sym_layer { nav_layer {
bindings = < bindings = <
&trans &kp EXCL &kp AT &kp DLLR &trans &trans &kp TILDE &kp EQUAL &kp BSLH &trans &kp TAB &none &kp C_VOL_UP &kp C_VOL_DN &kp C_MUTE &none &none &none &none &bootloader
&kp HASH &kp LT &kp MINUS &kp GT &kp GRAVE &kp AMPS &kp LBRC &kp LPAR &kp RPAR &kp PIPE &kp LSHFT &kp LALT &kp LCTRL &kp LGUI &kp BACKSPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
&kp FSLH &kp PLUS &kp CARET &kp STAR &kp UNDER &kp PRCNT &kp RBRC &kp LBKT &kp RBKT &trans &out OUT_TOG &bt BT_SEL 3 &bt BT_SEL 2 &bt BT_CLR &kp PRINTSCREEN &none &kp PG_DN &kp PG_UP &none &kp RETURN
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/ &trans &trans &trans &trans &trans &trans
>; >;
}; };
nav_layer { num_layer {
bindings = < bindings = <
&trans &kp PSCRN &kp MY_COPY &kp MY_PSCRN &kp MY_PASTE &trans &kp C_BRI_DEC &kp C_BRI_INC &kp VI_U &bootloader &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
&kp END &kp C_NEXT &kp C_PP &kp C_VOL_UP &kp DEL &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp HOME &kp LSHFT &kp LALT &kp LCTRL &kp LGUI &lhm RALT F11 &rhm RALT F12 &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
&trans &kp C_PREV &kp C_MUTE &kp C_VOL_DN &kp UNDER &kp VI_B &kp PG_DN &kp PG_UP &kp VI_W &trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
/*& &*/ &trans &trans &trans &bt BT_PRV &bt BT_NXT &bt BT_CLR /* & &*/ &trans &trans &trans &trans &trans &trans
>; >;
}; };
};
function_layer {
bindings = <
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
&kp F3 &kp F2 &kp F1 &kp F10 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9
&trans &trans &trans &kp F11 &trans &trans &kp F12 &trans &trans &trans
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/
>;
};
};
}; };