Skip to content

Commit

Permalink
Merge pull request #5 from dhruvinsh/dev
Browse files Browse the repository at this point in the history
Better home row mode
  • Loading branch information
dhruvinsh authored Jan 19, 2024
2 parents 1830e27 + 5b3d70d commit c622964
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 12 deletions.
7 changes: 5 additions & 2 deletions config/include/base.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
// some easy key equivalency
#define XXX &none
#define ___ &trans
#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left hand
#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right hand
#define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumbs

// Now import if any extra external layers needed
#include "combos.dtsi"
Expand All @@ -32,8 +35,8 @@

// Home row mods macro
// GUI -> ALT -> CTRL -> SHFT | SHFT -> CTRL -> ALT -> GUI
#define HRML(k1,k2,k3,k4) &hm LGUI k1 &hm LALT k2 &hm LCTRL k3 &hm LSHFT k4
#define HRMR(k1,k2,k3,k4) &hm RSHFT k1 &hm RCTRL k2 &hm RALT k3 &hm RGUI k4
#define HRML(k1,k2,k3,k4) &hml LGUI k1 &hml LALT k2 &hml LCTRL k3 &hml LSHFT k4
#define HRMR(k1,k2,k3,k4) &hmr RSHFT k1 &hmr RCTRL k2 &hmr RALT k3 &hmr RGUI k4

#define BT_PROFILES &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
#define CANCLE &kp K_CANCEL
Expand Down
37 changes: 27 additions & 10 deletions config/include/behaviors.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,43 @@
#include <dt-bindings/zmk/keys.h>

// specific config for the home row tap, I am still slow
#define QUICK_TAP_MS 200
#define REQUIRE_PRIOR_IDLE_MS 150
#define TAPPING_TERM_MS 250

// TODO: once get used to, shorter the time.
/ {
behaviors {
hm: homerow_mods {
hml: hml {
label = "hml";
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <TAPPING_TERM_MS>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <REQUIRE_PRIOR_IDLE_MS>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_R THUMBS>;
};

hmr: hmr {
label = "hmr";
compatible = "zmk,behavior-hold-tap";
#binding-cells = <2>;
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <150>;
require-prior-idle-ms = <150>;
tapping-term-ms = <TAPPING_TERM_MS>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <REQUIRE_PRIOR_IDLE_MS>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_L THUMBS>;
};
};
};

&lt {
tapping-term-ms = <220>;
quick-tap-ms = <150>;
require-prior-idle-ms = <150>;
tapping-term-ms = <TAPPING_TERM_MS>;
quick-tap-ms = <QUICK_TAP_MS>;
require-prior-idle-ms = <REQUIRE_PRIOR_IDLE_MS>;
};

&sk {
Expand All @@ -32,7 +50,6 @@

&mt {
flavor = "tap-preferred";
tapping-term-ms = <220>;
quick-tap-ms = <220>;
hold-trigger-key-positions = <0>;
tapping-term-ms = <TAPPING_TERM_MS>;
quick-tap-ms = <QUICK_TAP_MS>;
};

0 comments on commit c622964

Please sign in to comment.