2024-04-24 07:35:45 +00:00
|
|
|
// Copyright (c) 2022 The ZMK Contributors
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
#include <behaviors.dtsi>
|
|
|
|
#include <dt-bindings/zmk/keys.h>
|
|
|
|
#include <dt-bindings/zmk/bt.h>
|
|
|
|
|
2024-04-24 15:03:43 +00:00
|
|
|
// Cannot use it with keymap-drawer
|
|
|
|
/* #include "zmk-helpers/key-labels/34.h" */
|
|
|
|
#include "keypos.h"
|
2024-04-24 13:52:41 +00:00
|
|
|
|
2024-04-24 11:33:05 +00:00
|
|
|
#define BASE 0
|
|
|
|
#define SYM 1
|
|
|
|
#define NAV 2
|
|
|
|
#define WNAV 3
|
2024-04-24 15:03:43 +00:00
|
|
|
#define NUM 4
|
|
|
|
#define FUN 5
|
|
|
|
#define MODS 6
|
|
|
|
#define FRA 7
|
2024-04-24 12:11:10 +00:00
|
|
|
#define VOL_DN C_VOL_DN
|
|
|
|
#define VOL_UP C_VOL_UP
|
2024-04-24 11:33:05 +00:00
|
|
|
|
2024-04-24 15:03:43 +00:00
|
|
|
#define SPC_NUM < NUM SPACE
|
2024-04-24 12:11:10 +00:00
|
|
|
|
|
|
|
#define BT_PRF(num) &bt BT_SEL num
|
|
|
|
|
|
|
|
|
|
|
|
&sk {
|
|
|
|
release-after-ms = <2000>;
|
2024-04-24 13:54:40 +00:00
|
|
|
};
|
2024-04-24 07:35:45 +00:00
|
|
|
|
|
|
|
/ {
|
|
|
|
behaviors {
|
|
|
|
ht: hold_tap {
|
|
|
|
compatible = "zmk,behavior-hold-tap";
|
|
|
|
#binding-cells = <2>;
|
|
|
|
flavor = "tap-preferred";
|
|
|
|
tapping-term-ms = <220>;
|
|
|
|
quick-tap-ms = <150>;
|
|
|
|
require-prior-idle-ms = <100>;
|
|
|
|
bindings = <&kp>, <&kp>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
conditional_layers {
|
|
|
|
compatible = "zmk,conditional-layers";
|
|
|
|
tri_layer {
|
2024-04-24 11:33:05 +00:00
|
|
|
if-layers = <SYM NAV>;
|
|
|
|
then-layer = <WNAV>;
|
2024-04-24 07:35:45 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-24 13:52:41 +00:00
|
|
|
combos {
|
|
|
|
compatible = "zmk,combos";
|
|
|
|
combo_clear {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LT1 LT0>;
|
|
|
|
bindings = <&kp K_CANCEL>;
|
|
|
|
};
|
|
|
|
combo_escape {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LT2 LT1>;
|
|
|
|
bindings = <&kp ESCAPE>;
|
|
|
|
};
|
|
|
|
combo_equal {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LT3 LT2>;
|
|
|
|
bindings = <&kp EQUAL>;
|
|
|
|
};
|
|
|
|
combo_l_ctrl {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LM3 LM2>;
|
|
|
|
bindings = <&sk LCTRL>;
|
|
|
|
};
|
|
|
|
combo_tab {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LM2 LM1>;
|
2024-04-24 15:03:43 +00:00
|
|
|
bindings = << MODS TAB>;
|
2024-04-24 13:52:41 +00:00
|
|
|
};
|
|
|
|
combo_l_cmd {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <LM4 LM3>;
|
|
|
|
bindings = <&sk LCMD>;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
combo_backspace {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <RT2 RT3>;
|
|
|
|
bindings = <&kp BACKSPACE>;
|
|
|
|
};
|
|
|
|
combo_r_ctrl {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <RM2 RM3>;
|
|
|
|
bindings = <&sk LCTRL>;
|
|
|
|
};
|
|
|
|
combo_enter {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <RM1 RM2>;
|
|
|
|
bindings = <&kp ENTER>;
|
|
|
|
};
|
|
|
|
combo_r_cmd {
|
|
|
|
timeout-ms = <25>;
|
|
|
|
key-positions = <RM3 RM4>;
|
2024-04-24 14:07:26 +00:00
|
|
|
bindings = <&sk LCMD>;
|
2024-04-24 13:52:41 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
combo_l_alt {
|
|
|
|
timeout-ms = <80>;
|
|
|
|
key-positions = <LT2 LM3>;
|
|
|
|
bindings = <&sk LALT>;
|
|
|
|
};
|
|
|
|
combo_r_alt {
|
|
|
|
timeout-ms = <80>;
|
|
|
|
key-positions = <RT2 RM3>;
|
|
|
|
bindings = <&sk LALT>;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
combo_minus {
|
|
|
|
timeout-ms = <40>;
|
|
|
|
key-positions = <LT1 LM1>;
|
|
|
|
bindings = <&kp MINUS>;
|
|
|
|
};
|
|
|
|
combo_underscore {
|
|
|
|
timeout-ms = <40>;
|
|
|
|
key-positions = <LM1 LB1>;
|
|
|
|
bindings = <&kp UNDERSCORE>;
|
|
|
|
};
|
|
|
|
|
|
|
|
combo_colon {
|
|
|
|
timeout-ms = <40>;
|
|
|
|
key-positions = <RT1 RM1>;
|
|
|
|
bindings = <&kp COLON>;
|
|
|
|
};
|
|
|
|
combo_semi {
|
|
|
|
timeout-ms = <40>;
|
|
|
|
key-positions = <RM1 RB1>;
|
|
|
|
bindings = <&kp SEMI>;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-04-24 07:35:45 +00:00
|
|
|
keymap {
|
|
|
|
compatible = "zmk,keymap";
|
2024-04-24 11:33:05 +00:00
|
|
|
base {
|
2024-04-24 07:35:45 +00:00
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ Q │ W │ F │ P │ B │ │ J │ L │ U │ Y │ ' │
|
|
|
|
&kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp SQT
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ A │ R │ S │ T │ G │ │ M │ N │ E │ I │ O │
|
|
|
|
&kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ Z │ X │ C │ D │ V │ │ K │ H │ , < │ . > │ / ? │
|
|
|
|
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp FSLH
|
2024-04-24 07:35:45 +00:00
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
2024-04-24 11:33:05 +00:00
|
|
|
&mo NAV &kp LSHFT SPC_NUM &mo SYM
|
2024-04-24 07:35:45 +00:00
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2024-04-24 11:33:05 +00:00
|
|
|
symbols {
|
2024-04-24 07:35:45 +00:00
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ ~ │ & │ * │ + │ │ │ │ = │ \ │ | │ ` │
|
|
|
|
&kp TILDE &kp AMPS &kp STAR &kp PLUS &none &none &kp EQUAL &kp BSLH &kp PIPE &kp GRAVE
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ │ $ │ % │ ^ │ - │ │ : │ ( │ { │ [ │ │
|
|
|
|
&none &kp DLLR &kp PRCNT &kp CARET &kp MINUS &kp COLN &kp LPAR &kp LBRC &kp LBKT &none
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 11:33:05 +00:00
|
|
|
//│ │ ! │ @ │ # │ _ │ │ ; │ ) │ } │ ] │ │
|
|
|
|
&none &kp EXCL &kp AT &kp HASH &kp UNDER &kp SEMI &kp RPAR &kp RBRC &kp RBKT &none
|
2024-04-24 07:35:45 +00:00
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
2024-04-24 12:11:10 +00:00
|
|
|
&mo WNAV &kp ESC &trans &trans
|
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
nav {
|
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
|
|
|
//│ ESCAPE │ MUTE │ VOL DOWN │ VOL UP │ │ │ CAPS WORD│ INSERT │ │ │ DEL │
|
|
|
|
&kp ESC &kp C_MUTE &kp VOL_DN &kp VOL_UP &none &caps_word &kp INS &none &none &kp DEL
|
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
|
|
|
//│ SHIFT │ CMD │ ALT │ CTRL │ TAB │ │ BACKSPACE│ LEFT │ DOWN │ UP │ RIGHT │
|
|
|
|
&sk LSHFT &sk LCMD &kp LALT &kp LCTRL &kp TAB &kp BSPC &kp LEFT &kp DOWN &kp UP &kp RIGHT
|
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
|
|
|
//│ │ PLAY │ PREVIOUS │ NEXT │ │ │ ENTER │ HOME │ PG DOWN │ PG UP │ END │
|
|
|
|
&none &kp C_PP &kp C_PREV &kp C_NEXT &none &kp ENTER &kp HOME &kp PG_DN &kp PG_UP &kp END
|
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
|
|
|
&trans &trans &trans &mo WNAV
|
2024-04-24 07:35:45 +00:00
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2024-04-24 12:11:10 +00:00
|
|
|
winnav {
|
2024-04-24 07:35:45 +00:00
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
2024-04-24 12:11:10 +00:00
|
|
|
//│ │ │ │ │ │ │ │ │ │ │ │
|
2024-04-24 14:10:26 +00:00
|
|
|
&none &kp LG(N7) &kp LG(N8) &kp LG(N9) &none BT_PRF(0) BT_PRF(1) BT_PRF(2) BT_PRF(3) BT_PRF(4)
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 12:11:10 +00:00
|
|
|
//│ │ │ │ │ │ │ │ │ │ │ │
|
|
|
|
&none &kp LG(N4) &kp LG(N5) &kp LG(N6) &none &none &kp LG(D) &kp LG(N) &kp LG(P) &none
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 12:11:10 +00:00
|
|
|
//│ │ │ │ │ │ │ │ │ │ │ │
|
|
|
|
&none &kp LG(N1) &kp LG(N2) &kp LG(N3) &kp LG(N0) &none &none &bt BT_NXT &bt BT_PRV &bt BT_CLR
|
2024-04-24 07:35:45 +00:00
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
|
|
|
&trans &trans &trans &trans
|
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2024-04-24 12:23:36 +00:00
|
|
|
numbers {
|
2024-04-24 07:35:45 +00:00
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
2024-04-24 12:23:36 +00:00
|
|
|
//│ │ 7 │ 8 │ 9 │ * │ │ % │ │ │ │ │
|
2024-04-24 14:29:45 +00:00
|
|
|
&trans &kp N7 &kp N8 &kp N9 &kp STAR &kp PRCNT &trans &trans &trans &trans
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 12:23:36 +00:00
|
|
|
//│ - │ 4 │ 5 │ 6 │ + │ │ = │ CTRL │ ALT │ CMD │ SHIFT │
|
|
|
|
&kp MINUS &kp N4 &kp N5 &kp N6 &kp PLUS &kp EQL &sk LCTRL &sk LALT &sk LCMD &sk LSHFT
|
2024-04-24 07:35:45 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 12:23:36 +00:00
|
|
|
//│ │ 1 │ 2 │ 3 │ / │ │ │ │ │ │ │
|
|
|
|
&trans &kp N1 &kp N2 &kp N3 &kp FSLH &trans &trans &trans &trans &trans
|
2024-04-24 07:35:45 +00:00
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
2024-04-24 12:23:36 +00:00
|
|
|
&kp N0 &mo FUN &trans &trans
|
2024-04-24 07:35:45 +00:00
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
2024-04-24 12:23:36 +00:00
|
|
|
|
2024-04-24 13:00:58 +00:00
|
|
|
functions {
|
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
|
|
|
//│ │ F7 │ F8 │ F9 │ │ │ │ │ │ │ │
|
|
|
|
&none &kp F7 &kp F8 &kp F9 &none &none &none &none &none &none
|
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 14:19:56 +00:00
|
|
|
//│ │ F4 │ F5 │ F6 │ │ │ │ CTRL │ ALT │ CMD │ SHIFT │
|
|
|
|
&none &kp F4 &kp F5 &kp F6 &none &none &sk LCTRL &sk LALT &sk LCMD &sk LSHFT
|
2024-04-24 13:00:58 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
|
|
|
//│ │ F1 │ F2 │ F3 │ │ │ │ F10 │ F11 │ F12 │ │
|
|
|
|
&none &kp F1 &kp F2 &kp F3 &none &none &kp F10 &kp F11 &kp F12 &none
|
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
|
|
|
&trans &trans &trans &trans
|
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
|
|
|
mods {
|
|
|
|
bindings = <
|
|
|
|
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
|
|
|
|
//│ │ │ │ │ │ │ │ │ │ │ │
|
|
|
|
&trans &trans &trans &trans &trans &none &none &none &none &none
|
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
|
|
|
//│ - │ │ │ │ │ │ │ CTRL │ ALT │ CMD │ SHIFT │
|
2024-04-24 14:19:56 +00:00
|
|
|
&trans &trans &trans &trans &trans &none &sk LCTRL &sk LALT &sk LCMD &sk LSHFT
|
2024-04-24 13:00:58 +00:00
|
|
|
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
|
2024-04-24 14:19:56 +00:00
|
|
|
//│ │ │ │ │ │ │ │ │ RALT │ │ │
|
|
|
|
&trans &trans &trans &trans &trans &none &none &sk RALT &none &none
|
2024-04-24 13:00:58 +00:00
|
|
|
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
|
|
|
|
&trans &trans &trans &trans
|
|
|
|
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
|
|
|
|
>;
|
|
|
|
};
|
2024-04-24 07:35:45 +00:00
|
|
|
};
|
|
|
|
};
|