aboutsummaryrefslogtreecommitdiff
path: root/config/cradio.keymap
diff options
context:
space:
mode:
authorOscar Nelin <omn@dalux.com>2024-06-27 07:29:37 +0000
committerOscar Nelin <omn@dalux.com>2024-06-27 07:29:37 +0000
commit22fd84b7387ff6b8a879d4ba50389ef2abc3258c (patch)
treefa4383288e18bf1ab60070a114fcf4e98e87b2af /config/cradio.keymap
parentf5afdeb9a4068be120f2d7ae548ea42138f8bfd8 (diff)
parentf2a37659e3f28690900969a4b0a08972c1b62ae4 (diff)
Merge branch 'master' into colemak-dh
Diffstat (limited to 'config/cradio.keymap')
-rw-r--r--config/cradio.keymap68
1 files changed, 32 insertions, 36 deletions
diff --git a/config/cradio.keymap b/config/cradio.keymap
index 6522a8b..8b66f8b 100644
--- a/config/cradio.keymap
+++ b/config/cradio.keymap
@@ -6,20 +6,28 @@
#include <dt-bindings/zmk/bt.h>
// Layer definitions
-#define BASE 0
-#define SYM 1
-#define NUM 2
-#define NAV 3
+#define BASE 0
+#define SYM 1
+#define NUM 2
+#define NAV 3
#define SETTINGS 4
-
// Home row mods macro
#define HRML(k1,k2,k3) &lht LALT k1 &lht LCTRL k2 &lht LGUI k3
#define HRMR(k1,k2,k3) &rht RGUI k1 &rht RCTRL k2 &rht LALT k3
-#define HRMLS(k1,k2,k3,k4) &ht LSHIFT k1 &ht LALT k2 &ht LCTRL k3 &ht LGUI k4
-#define HRMRS(k1,k2,k3,k4) &ht RGUI k1 &ht RCTRL k2 &ht LALT k3 &ht RSHIFT k4
+
+// Hold to shift, tap to go to BASE layer
#define SHIFT &hl LSHIFT BASE
+// (Alphas) Cluster definitions
+#define RHS 5 6 7 8 9 \
+ 15 16 17 18 19 \
+ 25 26 27 28 29
+
+#define LHS 0 1 2 3 4 \
+ 10 11 12 13 14 \
+ 20 21 22 23 24
+
/ {
behaviors {
// left-hold-tap
@@ -27,25 +35,28 @@
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "balanced";
- tapping-term-ms = <220>;
+ tapping-term-ms = <180>;
require-prior-idle-ms = <135>;
- quick-tap-ms = <190>;
+ quick-tap-ms = <120>;
bindings = <&kp>, <&kp>;
- hold-trigger-key-positions = <5 6 7 8 9 15 16 17 18 19 25 26 27 28 29>;
+ // Hold trigger on opposite side, RHS and shift
+ hold-trigger-key-positions = <RHS>;
};
// left-hold-tap
rht: right_hold_tap {
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
- flavor = "tap-preferred";
- tapping-term-ms = <220>;
+ flavor = "balanced";
+ tapping-term-ms = <180>;
require-prior-idle-ms = <135>;
- quick-tap-ms = <190>;
+ quick-tap-ms = <120>;
bindings = <&kp>, <&kp>;
- hold-trigger-key-positions = <0 1 2 3 4 10 11 12 13 14 20 21 22 23 24>;
+ // Hold trigger on opposite side, LHS and shift
+ hold-trigger-key-positions = <LHS>;
};
+ // Used for shift
hl: hold_layer {
compatible = "zmk,behavior-hold-tap";
flavor = "balanced";
@@ -56,14 +67,6 @@
};
};
- // conditional_layers {
- // compatible = "zmk,conditional-layers";
- // settings_layer {
- // if-layers = <SYM NUM>;
- // then-layer = <SETTINGS>;
- // };
- // };
-
macros {
esc: esc {
label = "esc";
@@ -94,6 +97,7 @@
layers = <BASE SYM NUM NAV>;
};
+ // Combo for settings layer
combo_settings {
timeout-ms = <150>;
// t + y
@@ -101,14 +105,6 @@
bindings = <&to SETTINGS>;
layers = <NAV>;
};
-
- //combo_reset {
- // timeout-ms = <150>;
- // // t + y
- // key-positions = <4 5>;
- // bindings = <&bootloader>;
- // layers = <SETTINGS>;
- //};
};
keymap {
@@ -135,14 +131,14 @@
sym_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
- //│ ~ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
- &kp TILDE &kp PLUS &kp SQT &kp SEMI &kp GRAVE &kp FSLH &kp COLON &kp DQT &kp AMPS &trans
+ //│ \ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
+ &kp BSLH &kp PLUS &kp SQT &kp SEMI &kp GRAVE &kp FSLH &kp COLON &kp DQT &kp AMPS &trans
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ ^ │ = + │ ( │ ) │ @ │ │ | │ [ │ ] │ % │ $ │
&kp CARET HRML(EQUAL, LPAR, RPAR) &kp AT &kp PIPE HRMR(LBKT, RBKT, PRCNT) &kp DLLR
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
- //│ ! │ # │ { │ } │ \ │ │ * │ - _ │ , < │ . > │ │
- &kp EXCL &kp HASH &kp LBRC &kp RBRC &kp BSLH &kp ASTRK &kp MINUS &trans &trans &trans
+ //│ ! │ # │ { │ } │ ~ │ │ * │ - _ │ , < │ . > │ │
+ &kp EXCL &kp HASH &kp LBRC &kp RBRC &kp TILDE &kp ASTRK &kp MINUS &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
SHIFT &trans &trans &to NUM
// ╰──────────┴──────────╯ ╰──────────┴──────────╯
@@ -153,13 +149,13 @@
num_layer {
bindings = <
//╭──────────┬──────────┬──────────┬──────────┬──────────╮ ╭──────────┬──────────┬──────────┬──────────┬──────────╮
- //│ ~ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
+ //│ \ │ + │ ' │ ; : │ ` ~ │ │ / ? │ : │ " │ & │ │
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
//│ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │
&kp N1 HRML(N2, N3, N4) &kp N5 &kp N6 HRMR(N7, N8, N9) &kp N0
//├──────────┼──────────┼──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┼──────────┼──────────┤
- //│ ! │ # │ { │ } │ \ │ │ * │ - _ │ , < │ . > │ │
+ //│ ! │ # │ { │ } │ ~ │ │ * │ - _ │ , < │ . > │ │
&trans &trans &trans &trans &trans &kp FSLH &kp MINUS &trans &trans &trans
//╰──────────┴──────────┴──────────┼──────────┼──────────┤ ├──────────┼──────────┼──────────┴──────────┴──────────╯
SHIFT &trans &trans &to NAV