aboutsummaryrefslogtreecommitdiff
path: root/config/corne.keymap
blob: d6c74fd191daf3c71abbd5d4391dbe3d94792395 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: MIT

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include "../util.h"

&lt {
  tapping-term-ms = <100>;
};

/ {
  keymap {
    compatible = "zmk,keymap";
      0 {
        bindings = <
          &none &kp  Q &kp W &kp E &kp R  &kp T      &kp Y &kp  U &kp I     &kp O   &kp P     &none
          &none HRML(A,    S,    D,    F) &kp G      &kp H HRMR(J,    K,        L,      SEMI) &none
          &none &kp  Z &kp X &kp C &kp V  &kp B      &kp N &kp  M &kp COMMA &kp DOT &kp FSLH  &trans
                     &updir &lt 1 ESC &kp SPACE      &kp BSPC &lt 2 RS(RC(V)) &pnp
        >;
      };
      1 {
        bindings = <
          &trans &kp  N1       &kp N2  &kp N3   &kp N4    &kp N5         &kp N6    &kp  N7   &kp N8     &kp N9     &kp N0       &trans
          &trans HRML(EXCL,        AT,     HASH,    DLLR) &kp PRCNT      &kp CARET HRMR(AMPS,    ASTRK,     LPAR,      RPAR)    &trans
          &trans &kp  C_VOL_DN &kp TAB &kp CAPS &kp TILDE &kp GRAVE      &kp LEFT  &kp  DOWN &kp UP     &kp RIGHT  &kp C_VOL_UP &trans
                                                 &none &trans &none      &none &none &none
        >;
      };
      2 {
        bindings = <
          &trans &bootloader &bt BT_NXT &none  &none  &none       &none  &none  &none  &none  &none   &trans
          &trans &bt BT_CLR  &bt BT_PRV &none  &none  &none       &none  &none  &none  &none  &none   &trans
          &trans &kp F1      &kp F2     &kp F3 &kp F4 &kp F5      &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &trans
                                           &none &none &none      &none &trans &none
        >;
      };
  };

  behaviors {
    hm: homerow_mods {
      compatible = "zmk,behavior-hold-tap";
      label = "HOMEROW_MODS";
      #binding-cells = <2>;
      tapping-term-ms = <130>;
      quick-tap-ms = <160>;
      flavor = "tap-preferred";
      bindings = <&kp>, <&kp>;
    };

    pnp: play_next_prev {
      compatible = "zmk,behavior-tap-dance";
      label = "PLAY_NEXT_PREV";
      #binding-cells = <0>;
      tapping-term-ms = <210>;
      bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
    };
    TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE)
    TAP_DANCE(quot_dquo, &kp SQT,  &kp DQT)
    TAP_DANCE(cbrkt,     &kp LBRC, &kp RBRC)
    TAP_DANCE(brkt,      &kp LBKT, &kp RBKT)
    TAP_DANCE(min_dash,  &kp MINUS, &emdash)
  };

  macros {
    updir: updir {
      label = "UP_DIR";
      compatible = "zmk,behavior-macro";
      #binding-cells = <0>;
      bindings = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
    };
    emdash: emdash {
      label = "EM_DASH";
      compatible = "zmk,behavior-macro";
      #binding-cells = <0>;
      bindings = <&macro_press &kp LSHFT &kp LCTRL>,
                 <&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
                 <&macro_release &kp LSHFT &kp LCTRL>;
    };
  };

  combos {
    compatible = "zmk,combos";
      //    name       output         pos.
      COMBO(ru_ent,    &kp RET,       4 7)
      COMBO(dk_eql,    &kp EQUAL,     15 20)
      COMBO(gh_quot,   &td_quot_dquo, 17 18)
      COMBO(ty_coln,   &kp COLON,     5 6)
      COMBO(bn_unds,   &kp UNDER,     29 30)
      COMBO(er_cbkt,   &td_cbrkt,     3 4)
      COMBO(ui_brkt,   &td_brkt,      7 8)
      COMBO(ccom_plus, &kp PLUS,      27 32)
      COMBO(ei_bsls,   &td_bsls_pipe, 3 8)
      COMBO(vm_mins,   &td_min_dash,  28 31)
      COMBO(fj_capw,   &caps_word,    16 19)
  };
};