Skip to content

Commit

Permalink
feat(keymap): update rommana
Browse files Browse the repository at this point in the history
  • Loading branch information
burkfers committed Jun 7, 2024
1 parent d938c54 commit f6a2f44
Show file tree
Hide file tree
Showing 6 changed files with 1,396 additions and 39 deletions.
5 changes: 4 additions & 1 deletion config/combos.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
key-positions = <KEYPOS>; \
layers = <LAYERS>; \
require-prior-idle-ms = <QUICKTAP>; \
__VA_ARGS__ \
__VA_ARGS__ \
};

/ {
Expand All @@ -30,6 +30,8 @@ COMBO(rbkt, &kp RBKT, 17 18, APTMAK QWERTY, 40, 100)
COMBO(tab, &kp TAB, 11 13, APTMAK QWERTY SYM, 40, 150)
COMBO(del, &kp DEL, 16 18, APTMAK QWERTY SYM, 40, 150)

COMBO(swp, &sl SWPL, 4 14, APTMAK, 40, 100)

COMBO(ret, &kp RET, 16 17 18, APTMAK QWERTY, 40, 150)

COMBO(capswd, &caps_word, 13 16, APTMAK QWERTY, 60, 200)
Expand All @@ -38,6 +40,7 @@ COMBO(lock, &kp LG(L), 3 4, APTMAK QWERTY, 80, 500)

COMBO(play, &kp C_PP, 4 14, NAV, 200, 200)

COMBO(q, &kp Q, 1 2, APTMAK QWERTY, 80, 50)
COMBO(z, &kp Z, 20 21, APTMAK QWERTY, 80, 50)
COMBO(v, &kp V, 21 22, APTMAK, 40, 50)
COMBO(bslh, &kp BSLH, 23 24, APTMAK QWERTY SYM, 80, 100)
Expand Down
70 changes: 32 additions & 38 deletions config/rommana.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
// Layer aliases
#define APTMAK 0
#define QWERTY 1
#define SYM 3
#define NAV 4
#define FUN 5
#define SYM 2
#define NAV 3
#define FUN 4
#define SWPL 5

// Desktop and tab navigation shortcuts
#define D_LT LG(LEFT)
Expand Down Expand Up @@ -47,6 +48,11 @@
tapping-term-ms = <150>;
};

&sl {
release-after-ms = <3000>;
};


&caps_word {
continue-list = <UNDERSCORE MINUS BSPC DEL N1 N2 N3 N4 N5 N6 N7 N8 N9 N0>;
};
Expand Down Expand Up @@ -95,14 +101,6 @@
hold-trigger-key-positions = <KEYS_L THUMBS>;
hold-trigger-on-release;
};

// sticky key to be used for alt-tab macro
sk_at: sk_alttabber {
compatible = "zmk,behavior-sticky-key";
#binding-cells = <1>;
bindings = <&kp>;
release-after-ms = <500>;
};
};

cond_layers {
Expand All @@ -114,26 +112,6 @@
};
};

macros {
ZMK_MACRO(inv_qm,
wait-ms = <10>;
tap-ms = <10>;
bindings
= <&macro_press &kp LALT>
, <&macro_tap &kp KP_N1 &kp KP_N6 &kp KP_N8>
, <&macro_release &kp LALT>;
)
ZMK_MACRO(alt_tabber, // adapted from @moutis on ZMK Discord
wait-ms = <10>;
tap-ms = <10>;
bindings = <&macro_press &kp LALT> // leave ALT down to keep menu up
, <&macro_tap &kp TAB> // open the menu
, <&macro_pause_for_release> // wait until key release
, <&macro_tap &sk_at RALT> // start timer to release ALT after timeout
, <&macro_release &kp LALT>; // now release the initial hold
)
};

keymap {
compatible = "zmk,keymap";

Expand All @@ -147,7 +125,7 @@
// ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯ ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯
&kp C &kp G &kp D &kp M &kp COMMA &kp DOT
// ╰─────────────┴─────────────┼─────────────┼─────────────╮ ╭─────────────┼─────────────┼─────────────┴─────────────╯
&kp SPACE &lt NAV ESC &lt SYM BSPC &kp E
&lt NAV SPACE &lt NAV ESC &lt SYM BSPC &kp E
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯
>;
};
Expand All @@ -173,9 +151,9 @@
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp SLASH &kp N7 &kp N8 &kp N9 &kp COMMA
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp PLUS &kp EQUAL &kp UNDER &kp MINUS &kp CARET &kp N0 &kp N4 &kp N5 &kp N6 &kp DOT
&kp PLUS &kp EQUAL &kp UNDER &kp MINUS &kp CARET &kp N0 &amr RSHFT N4 &amr RCTRL N5 &amr RCTRL N6 &amr RGUI DOT
// ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯ ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯
&inv_qm &kp STAR &kp AMPS &kp N1 &kp N2 &kp N3
&kp COLON &kp STAR &kp AMPS &kp N1 &kp N2 &kp N3
// ╰─────────────┴─────────────┼─────────────┼─────────────╮ ╭─────────────┼─────────────┼─────────────┴─────────────╯
&kp BSPC &trans &trans &none
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯
Expand All @@ -186,11 +164,11 @@
display-name = "NAV";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp LA(F4) &kp TAB_LT &kp TAB_RT &kp LC(F4) &kp C_VOL_UP &kp INS &kp PG_DN &kp UP &kp PG_UP &kp C_AL_CALC
&kp LG(Q) &none &none &none &kp C_VOL_UP &kp H &kp J &kp K &kp L &kp HOME
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp LCTRL &kp LGUI &kp LALT &mt LSHFT TAB &kp C_VOL_DN &kp HOME &kp LEFT &kp DOWN &kp RIGHT &kp END
&kp LGUI &kp LALT &kp LCTRL &mt LSHFT TAB &kp C_VOL_DN &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp END
// ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯ ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯
&none &alt_tabber &kp LS(INS) &kp DEL &kp C_PREV &kp C_NEXT
&none &none &kp LS(INS) &kp PG_UP &kp PG_DN &kp C_NEXT
// ╰─────────────┴─────────────┼─────────────┼─────────────╮ ╭─────────────┼─────────────┼─────────────┴─────────────╯
&none &trans &trans &kp SPACE
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯
Expand All @@ -205,9 +183,25 @@
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
// ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯ ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯
&kp D_LT &kp D_RT &kp F11 &kp CAPS FN_EXTRA1 FN_EXTRA2
&kp D_LT &kp D_RT &kp F11 &kp PSCRN FN_EXTRA1 FN_EXTRA2
// ╰─────────────┴─────────────┼─────────────┼─────────────╮ ╭─────────────┼─────────────┼─────────────┴─────────────╯
&bootloader &trans &trans &bootloader
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯
>;
};

// poor man's swap hands - figure out a better way
swp_layer {
display-name = "KAMTPA";
bindings = <
// ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮ ╭─────────────┬─────────────┬─────────────┬─────────────┬─────────────╮
&kp SQT &kp Y &kp U &kp L &kp J &kp B &kp P &kp W &kp W &kp V
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&amr RGUI O &amr RALT I &amr RCTRL A &asr RSHFT N &kp X &kp K &asl LSHFT H &aml LCTRL T &aml LALT S &aml LGUI R
// ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯ ╰─────────────┼─────────────┼─────────────┼─────────────┼─────────────╯
&kp DOT &kp COMMA &kp M &kp D &kp G &kp C
// ╰─────────────┴─────────────┼─────────────┼─────────────╮ ╭─────────────┼─────────────┼─────────────┴─────────────╯
&kp E &kp BSPC &kp ESC &kp SPACE
// ╰─────────────┴─────────────╯ ╰─────────────┴─────────────╯
>;
};
Expand Down
4 changes: 4 additions & 0 deletions keymap-drawer/draw.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
keymap parse -z ../config/rommana.keymap > rommana.yaml && \
keymap draw rommana.yaml > rommana.svg && \
magick -size 800x800 -background '#303030' rommana.svg rommana.png
Binary file added keymap-drawer/rommana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f6a2f44

Please sign in to comment.