2022-03-14 22:17:15 +00:00
|
|
|
/*
|
|
|
|
* 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>;
|
2022-03-15 05:02:31 +00:00
|
|
|
quick-release;
|
|
|
|
};
|
|
|
|
|
|
|
|
&caps_word {
|
|
|
|
continue-list = <UNDERSCORE MINUS BSPC>;
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
|
2022-03-16 01:57:35 +00:00
|
|
|
#define RSTHD_L 0
|
|
|
|
#define NUM_L 1
|
|
|
|
#define SYM_L 2
|
|
|
|
#define NAV_L 3
|
|
|
|
#define FUN_L 4
|
2022-03-14 22:17:15 +00:00
|
|
|
|
|
|
|
#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)
|
|
|
|
|
|
|
|
/ {
|
2022-03-15 05:02:31 +00:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
|
|
|
|
|
|
|
// shortcut
|
|
|
|
#define COMBO(NAME, BINDINGS, KEYPOS, TIMEOUT) \
|
|
|
|
combo_##NAME { \
|
|
|
|
timeout-ms = <TIMEOUT>; \
|
|
|
|
bindings = <BINDINGS>; \
|
|
|
|
key-positions = <KEYPOS>; \
|
|
|
|
};
|
|
|
|
|
|
|
|
/* KEY POSITIONS
|
|
|
|
|
|
|
|
╭────────────────────╮ ╭────────────────────╮
|
|
|
|
│ 0 1 2 3 4 │ │ 5 6 7 8 9 │
|
|
|
|
│ 10 11 12 13 14 │ │ 15 16 17 18 19 │
|
|
|
|
│ 20 21 22 23 24 │ │ 25 26 27 28 29 │
|
|
|
|
╰───────╮ 30 31 32 │ │ 33 34 35 ╭───────╯
|
|
|
|
╰────────────╯ ╰────────────╯ */
|
|
|
|
|
|
|
|
COMBO(caps_word_right, &caps_word, 26 27, 60)
|
|
|
|
COMBO(caps_word_left, &caps_word, 22 23, 60)
|
2022-03-16 01:57:35 +00:00
|
|
|
|
|
|
|
COMBO(colon, &kp COLON, 6 7, 60)
|
|
|
|
COMBO(semicolon, &kp SEMI, 7 8, 60)
|
|
|
|
|
|
|
|
COMBO(slash, &kp FSLH, 1 2, 60)
|
|
|
|
|
2022-03-15 05:02:31 +00:00
|
|
|
COMBO(underscore, &kp UNDER, 31 32, 100)
|
|
|
|
COMBO(minus, &kp MINUS, 33 34, 100)
|
2022-03-16 01:57:35 +00:00
|
|
|
|
2022-03-15 17:29:06 +00:00
|
|
|
COMBO(equal, &kp EQUAL, 17 26, 60)
|
2022-03-16 02:36:21 +00:00
|
|
|
COMBO(enter, &kp ENTER, 12 23, 100)
|
2022-03-15 05:02:31 +00:00
|
|
|
};
|
|
|
|
|
2022-03-14 22:17:15 +00:00
|
|
|
behaviors {
|
|
|
|
lhm: left_hand_positional_hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "LEFT_POSITIONAL_HOLD_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
2022-03-15 02:10:39 +00:00
|
|
|
tapping-term-ms = <200>;
|
2022-03-14 22:17:15 +00:00
|
|
|
quick-tap-ms = <200>;
|
|
|
|
bindings = <&kp>, <&kp>;
|
2022-03-15 02:10:39 +00:00
|
|
|
// hold-trigger-key-positions = <18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35>;
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
rhm: right_hand_positional_hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
label = "RIGHT_POSITIONAL_HOLD_TAP";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
2022-03-15 02:10:39 +00:00
|
|
|
tapping-term-ms = <200>;
|
2022-03-16 01:57:35 +00:00
|
|
|
quick-tap-ms = <300>;
|
2022-03-14 22:17:15 +00:00
|
|
|
bindings = <&kp>, <&kp>;
|
2022-03-15 02:10:39 +00:00
|
|
|
// hold-trigger-key-positions = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17>;
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
|
2022-03-15 02:10:39 +00:00
|
|
|
base_lt: base_layer_hold_tap {
|
2022-03-14 22:17:15 +00:00
|
|
|
compatible = "zmk,behavior-hold-tap";
|
2022-03-15 02:10:39 +00:00
|
|
|
label = "BASE_LAYER_HOLD_TAP";
|
2022-03-14 22:17:15 +00:00
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
|
|
|
tapping-term-ms = <200>;
|
2022-03-16 01:57:35 +00:00
|
|
|
quick-tap-ms = <300>;
|
2022-03-14 22:17:15 +00:00
|
|
|
bindings = <&mo>, <&kp>;
|
|
|
|
};
|
|
|
|
|
2022-03-15 02:10:39 +00:00
|
|
|
|
2022-03-16 01:57:35 +00:00
|
|
|
rpt_lt: repeat_hold_tap {
|
2022-03-14 22:17:15 +00:00
|
|
|
compatible = "zmk,behavior-hold-tap";
|
2022-03-16 02:12:32 +00:00
|
|
|
label = "REPEAT_HOLD_TAP";
|
2022-03-14 22:17:15 +00:00
|
|
|
#binding-cells = <2>;
|
2022-03-16 01:57:35 +00:00
|
|
|
flavor = "tap-preferred";
|
2022-03-14 22:17:15 +00:00
|
|
|
tapping-term-ms = <200>;
|
2022-03-16 01:57:35 +00:00
|
|
|
quick-tap-ms = <300>;
|
|
|
|
bindings = <&mo>, <&key_repeat>;
|
2022-03-14 22:17:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
|
|
|
|
|
|
|
// RSTHD
|
|
|
|
rsthd_layer {
|
|
|
|
bindings = <
|
2022-03-16 01:57:35 +00:00
|
|
|
&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 &kp DOT &sk LSHIFT
|
|
|
|
/*& &*/ &kp ESC &base_lt NAV_L SPC &rpt_lt SYM_L 0 &base_lt SYM_L BSPC &base_lt NUM_L E &base_lt FUN_L TAB /* & &*/
|
2022-03-14 22:17:15 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
num_layer {
|
|
|
|
bindings = <
|
2022-03-16 01:57:35 +00:00
|
|
|
&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 /* & &*/
|
2022-03-14 22:17:15 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
sym_layer {
|
|
|
|
bindings = <
|
2022-03-16 01:57:35 +00:00
|
|
|
&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 /* & &*/
|
2022-03-14 22:17:15 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
nav_layer {
|
|
|
|
bindings = <
|
2022-03-16 01:57:35 +00:00
|
|
|
&trans &kp PSCRN &kp MY_COPY &kp MY_PSCRN &kp MY_PASTE &trans &kp C_BRI_DEC &kp C_BRI_INC &kp VI_U &trans
|
|
|
|
&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
|
2022-03-16 02:12:32 +00:00
|
|
|
&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
|
2022-03-16 01:57:35 +00:00
|
|
|
/*& &*/ &trans &trans &trans &trans &trans &trans /* & &*/
|
2022-03-14 22:17:15 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|