Adding combos!

This commit is contained in:
Andrew Rae 2022-03-15 01:02:31 -04:00
parent 472249a965
commit ff69127492

View file

@ -10,6 +10,11 @@
&sk {
release-after-ms = <750>;
quick-release;
};
&caps_word {
continue-list = <UNDERSCORE MINUS BSPC>;
};
#define RSTHD 0
@ -26,6 +31,36 @@
#define VI_B LC(LEFT)
/ {
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)
COMBO(colon, &kp COLON, 7 8, 60)
COMBO(semicolon, &kp SEMI, 1 2, 60)
COMBO(underscore, &kp UNDER, 31 32, 100)
COMBO(minus, &kp MINUS, 33 34, 100)
COMBO(equal, &kp EQUAL, 17 26, 100)
COMBO(slash, &kp SLASH, 12 23, 100)
};
behaviors {
lhm: left_hand_positional_hold_tap {
compatible = "zmk,behavior-hold-tap";
@ -74,16 +109,6 @@
keymap {
compatible = "zmk,keymap";
// This is a sample keymap intended to be replaced with your own
// base_layer {
// bindings = <
// &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
// &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI
// &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SLASH
// &kp ESC &kp TAB &kp BSPC &kp SPACE &kp ENTER &kp ESC
// >;
// };
// RSTHD
rsthd_layer {
bindings = <