Skip to content

Commit

Permalink
try chording
Browse files Browse the repository at this point in the history
  • Loading branch information
olgam4 committed Jun 26, 2024
1 parent 83114cb commit 8fe4bbf
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 9 deletions.
48 changes: 40 additions & 8 deletions config/boards/shields/ponyta/ponyta.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define SYM 2
#define FRA 3
#define NAV 4
#define CHORD 5

#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left-hand keys
#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right-hand keys
Expand All @@ -42,6 +43,7 @@

#define SMART_NUM &smart_num NUM 0
#define SPACE_NAV &space_nav NAV SPACE
#define ESC_CHORD &esc_chord CHORD ESC

/ {
macros {
Expand Down Expand Up @@ -89,6 +91,22 @@
, <&macro_release &kp LGUI &kp LSHFT &kp N5>
;
};
m_the: m_the {
compatible = "zmk,behavior-macro";
wait-ms = <10>;
tap-ms = <0>;
#binding-cells = <0>;
bindings = <&kp T &kp H &kp E &kp SPACE>;
};
};
combos {
compatible = "zmk,combos";
combo_m_the {
timeout-ms = <200>;
key-positions = <RM1>;
bindings = <&m_the>;
layers = <CHORD>;
};
};
behaviors {
as: auto_shift {
Expand Down Expand Up @@ -173,16 +191,17 @@
quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&kp>;
};
esc_tab: esc_tab {
compatible = "zmk,behavior-tap-dance";
#binding-cells = <0>;
tapping-term-ms = <200>;
bindings = <&kp ESC>, <&kp TAB>;
esc_chord: esc_chord {
compatible = "zmk,behavior-hold-tap";
flavor = "balanced";
#binding-cells = <2>;
tapping-term-ms = <300>;
quick-tap-ms = <QUICK_TAP_MS>;
bindings = <&mo>, <&kp>;
};
};
keymap {
compatible = "zmk,keymap";

default {
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
Expand All @@ -192,7 +211,7 @@
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &com_semi &dot_col &q_scream
// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯
SMART_NUM &kp RET &esc_tab SPACE_NAV &sl SYM &bs_del
SMART_NUM &kp RET ESC_CHORD SPACE_NAV &sl SYM &bs_del
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
Expand All @@ -205,7 +224,7 @@
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp D &kp V &kp K &kp H &com_semi &dot_col &q_scream
// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯
&kp RET &kp RET &esc_tab SPACE_NAV &sl SYM &bs_del
&kp RET &kp RET ESC_CHORD SPACE_NAV &sl SYM &bs_del
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
Expand Down Expand Up @@ -245,6 +264,19 @@
&none &none &none &none &none &none &none &none &none &none
// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯
&record &kp RET &screenshot &none &none &none
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
chord {
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&none &none &none &none &none &none &none &none &none &none
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&none &none &none &none &none &none &none &none &none &none
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&none &none &none &none &none &none &none &none &none &none
// ╰─────────────┴─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┴-────────────╯
&none &none &none &none &none &none
// ╰─────────────┴─────────────┴─────────────╯ ╰─────────────┴─────────────┴─────────────╯
>;
};
Expand Down
6 changes: 5 additions & 1 deletion config/ponyta.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=7

CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=512
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=10

# Uncomment the following line to enable USB Logging (this increases power usage by a significant amount, turn it off when not in use)
CONFIG_ZMK_USB_LOGGING=y
# CONFIG_ZMK_USB_LOGGING=y

0 comments on commit 8fe4bbf

Please sign in to comment.