Copy my Atreus' QMK layout
This commit is contained in:
parent
b529d191f2
commit
10d1805cc9
1 changed files with 63 additions and 79 deletions
|
@ -1,40 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
&sk {
|
||||
release-after-ms = <750>;
|
||||
quick-release;
|
||||
};
|
||||
#include <dt-bindings/zmk/outputs.h>
|
||||
|
||||
&caps_word {
|
||||
continue-list = <UNDERSCORE MINUS BSPC>;
|
||||
};
|
||||
|
||||
#define RSTHD_L 0
|
||||
#define NUM_L 1
|
||||
#define SYM_L 2
|
||||
#define NAV_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)
|
||||
#define BASE_L 0
|
||||
#define SYM_L 1
|
||||
#define NAV_L 2
|
||||
#define NUM_L 3
|
||||
|
||||
/ {
|
||||
combos {
|
||||
compatible = "zmk,combos";
|
||||
|
||||
// shortcut
|
||||
#define COMBO(NAME, BINDINGS, KEYPOS, TIMEOUT) \
|
||||
combo_##NAME { \
|
||||
timeout-ms = <TIMEOUT>; \
|
||||
|
@ -51,21 +38,21 @@
|
|||
╰───────╮ 30 31 32 │ │ 33 34 35 ╭───────╯
|
||||
╰────────────╯ ╰────────────╯ */
|
||||
|
||||
COMBO(caps_word_right, &caps_word, 26 27, 60)
|
||||
COMBO(caps_word_left, &caps_word, 22 23, 60)
|
||||
//COMBO(caps_word_right, &caps_word, 26 27, 60)
|
||||
//COMBO(caps_word_left, &caps_word, 22 23, 60)
|
||||
|
||||
COMBO(colon, &kp COLON, 7 8, 60)
|
||||
COMBO(semicolon, &kp SEMI, 27 28, 60)
|
||||
COMBO(slash, &kp FSLH, 1 2, 60)
|
||||
//COMBO(colon, &kp COLON, 7 8, 60)
|
||||
//COMBO(semicolon, &kp SEMI, 27 28, 60)
|
||||
//COMBO(slash, &kp FSLH, 1 2, 60)
|
||||
|
||||
COMBO(minus, &kp MINUS, 31 32, 100)
|
||||
COMBO(underscore, &kp UNDER, 33 34, 100)
|
||||
//COMBO(minus, &kp MINUS, 31 32, 100)
|
||||
//COMBO(underscore, &kp UNDER, 33 34, 100)
|
||||
|
||||
COMBO(equal, &kp EQUAL, 12 23, 100)
|
||||
COMBO(enter, &kp ENTER, 17 26, 60)
|
||||
//COMBO(equal, &kp EQUAL, 12 23, 100)
|
||||
//COMBO(enter, &kp ENTER, 17 26, 60)
|
||||
|
||||
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 {
|
||||
|
@ -74,7 +61,7 @@
|
|||
label = "LEFT_POSITIONAL_HOLD_TAP";
|
||||
#binding-cells = <2>;
|
||||
flavor = "tap-preferred";
|
||||
tapping-term-ms = <200>;
|
||||
tapping-term-ms = <175>;
|
||||
quick-tap-ms = <125>;
|
||||
global-quick-tap;
|
||||
bindings = <&kp>, <&kp>;
|
||||
|
@ -87,7 +74,7 @@
|
|||
label = "RIGHT_POSITIONAL_HOLD_TAP";
|
||||
#binding-cells = <2>;
|
||||
flavor = "tap-preferred";
|
||||
tapping-term-ms = <200>;
|
||||
tapping-term-ms = <175>;
|
||||
quick-tap-ms = <125>;
|
||||
global-quick-tap;
|
||||
bindings = <&kp>, <&kp>;
|
||||
|
@ -106,55 +93,52 @@
|
|||
bindings = <&mo>, <&kp>;
|
||||
};
|
||||
|
||||
conditional_layers {
|
||||
compatible = "zmk,conditional-layers";
|
||||
tri_layer {
|
||||
if-layers = <NAV_L SYM_L>;
|
||||
then-layer = <NUM_L>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
// RSTHD
|
||||
rsthd_layer {
|
||||
bindings = <
|
||||
&kp Z &kp C &kp Y &kp F &kp P &kp X &kp M &kp APOS &kp U &kp Q
|
||||
&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
|
||||
&sk LSHIFT &kp V &kp G &kp K &kp B &kp W &kp J &kp COMMA &key_repeat &sk LSHIFT
|
||||
/*& &*/ &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 /* & &*/
|
||||
>;
|
||||
};
|
||||
base_layer {
|
||||
bindings = <
|
||||
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
|
||||
&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
|
||||
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SINGLE_QUOTE
|
||||
&mo NAV_L &kp LSHFT &none &none &kp SPACE &mo SYM_L
|
||||
>;
|
||||
};
|
||||
|
||||
num_layer {
|
||||
bindings = <
|
||||
&trans &kp LT &kp MINUS &kp GT &trans &trans &trans &kp EQUAL &trans &trans
|
||||
&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 FSLH &kp PLUS &kp CARET &kp STAR &trans &trans &trans &kp COMMA &kp DOT &trans
|
||||
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/
|
||||
>;
|
||||
};
|
||||
sym_layer {
|
||||
bindings = <
|
||||
&kp ESC &kp LBKT &kp LBRC &kp LPAR &kp TILDE &kp CARET &kp RPAR &kp RBRC &kp RBKT &kp GRAVE
|
||||
&kp MINUS &kp STAR &kp EQUAL &kp UNDERSCORE &kp DOLLAR &rhm RALT HASH &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
|
||||
&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
|
||||
>;
|
||||
};
|
||||
|
||||
sym_layer {
|
||||
bindings = <
|
||||
&trans &kp EXCL &kp AT &kp DLLR &trans &trans &kp TILDE &kp EQUAL &kp BSLH &trans
|
||||
&kp HASH &kp LT &kp MINUS &kp GT &kp GRAVE &kp AMPS &kp LBRC &kp LPAR &kp RPAR &kp PIPE
|
||||
&kp FSLH &kp PLUS &kp CARET &kp STAR &kp UNDER &kp PRCNT &kp RBRC &kp LBKT &kp RBKT &trans
|
||||
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/
|
||||
>;
|
||||
};
|
||||
nav_layer {
|
||||
bindings = <
|
||||
&kp TAB &none &kp C_VOL_UP &kp C_VOL_DN &kp C_MUTE &none &none &none &none &bootloader
|
||||
&kp LSHFT &kp LALT &kp LCTRL &kp LGUI &kp BACKSPACE &kp LEFT &kp DOWN &kp UP &kp RIGHT &none
|
||||
&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
|
||||
>;
|
||||
};
|
||||
|
||||
nav_layer {
|
||||
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 END &kp C_NEXT &kp C_PP &kp C_VOL_UP &kp DEL &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp HOME
|
||||
&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
|
||||
/*& &*/ &trans &trans &trans &bt BT_PRV &bt BT_NXT &bt BT_CLR /* & &*/
|
||||
>;
|
||||
};
|
||||
|
||||
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 /* & &*/
|
||||
>;
|
||||
};
|
||||
};
|
||||
num_layer {
|
||||
bindings = <
|
||||
&kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0
|
||||
&kp LSHFT &kp LALT &kp LCTRL &kp LGUI &lhm RALT F11 &rhm RALT F12 &kp LGUI &kp LCTRL &kp LALT &kp LSHFT
|
||||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10
|
||||
&trans &trans &trans &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue