Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chording layout #2

Merged
merged 8 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.tmp
189 changes: 143 additions & 46 deletions config/cradio.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,104 @@
combos {
compatible = "zmk,combos";

tog_qwerty {
bindings = <&tog 5>;
key-positions = <10 14>;
exit_gaming {
bindings = <&tog 7>;
key-positions = <4 24 14>;
require-prior-idle-ms = <2000>;
layers = <0 5>;
layers = <7>;
};

tog_navigation {
bindings = <&tog 3>;
key-positions = <16 17>;
require-prior-idle-ms = <500>;
ctrl_shift {
bindings = <&ctrl_shift>;
key-positions = <13 12>;
layers = <1>;
};

tog_numpad {
bindings = <&tog 4>;
key-positions = <17 18>;
require-prior-idle-ms = <500>;
ctrl_alt {
bindings = <&crl_alt>;
key-positions = <10 13>;
layers = <1>;
};

tog_gaming {
bindings = <&tog 6>;
key-positions = <4 0>;
require-prior-idle-ms = <500>;
ctrl_gui {
bindings = <&ctrl_gui>;
key-positions = <13 11>;
layers = <1>;
};

shift_alt {
bindings = <&shift_alt>;
key-positions = <12 10>;
layers = <1>;
};

shift_gui {
bindings = <&shift_gui>;
key-positions = <12 11>;
layers = <1>;
};

alt_gui {
bindings = <&alt_gui>;
key-positions = <10 11>;
layers = <1>;
};

ctrl_shift_alt {
bindings = <&ctrl_shift_alt>;
key-positions = <13 12 10>;
layers = <1>;
};
};

macros {
ctrl_shift: ctrl_shift {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_CONTROL &sk LEFT_SHIFT>;
label = "CTRL_SHIFT";
};

crl_alt: crl_alt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_CONTROL &sk LEFT_ALT>;
label = "CRL_ALT";
};

ctrl_gui: ctrl_gui {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_CONTROL &sk LEFT_GUI>;
label = "CTRL_GUI";
};

shift_alt: shift_alt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_SHIFT &sk LEFT_ALT>;
label = "SHIFT_ALT";
};

shift_gui: shift_gui {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_SHIFT &sk LEFT_GUI>;
label = "SHIFT_GUI";
};

alt_gui: alt_gui {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_ALT &sk LEFT_GUI>;
label = "ALT_GUI";
};

ctrl_shift_alt: ctrl_shift_alt {
compatible = "zmk,behavior-macro";
#binding-cells = <0>;
bindings = <&sk LEFT_CONTROL &sk LEFT_SHIFT &sk LEFT_ALT>;
label = "CTRL_SHIFT_ALT";
};
};

Expand All @@ -38,77 +113,99 @@

dvorak {
bindings = <
&kp SEMI &kp COMMA &kp DOT &kp P &kp Y &kp F &kp G &kp C &kp R &kp L
&mt LEFT_ALT A &mt LEFT_SHIFT O &mt LEFT_CONTROL E &mt LEFT_META U &kp I &kp D &mt RIGHT_META H &mt RIGHT_CONTROL T &mt RIGHT_SHIFT N &mt RIGHT_ALT S
&kp SQT &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z
&kp ESCAPE &kp TAB &lt 1 SPACE &kp ENTER
&kp TAB &kp ENTER &kp BACKSPACE &kp P &kp Y &kp F &kp G &kp C &kp R &kp L
&kp A &kp O &kp E &kp U &kp I &kp D &kp H &kp T &kp N &kp S
&key_repeat &kp Q &kp J &kp K &kp X &kp B &kp M &kp W &kp V &kp Z
&sl 1 &kp ESCAPE &kp SPACE &sl 2
>;

label = "dvorak";
};

modifiers {
bindings = <
&none &none &tog 5 &tog 4 &tog 8 &sl 8 &to 6 &to 0 &none &none
&sk LEFT_ALT &sk LEFT_GUI &sk LEFT_SHIFT &sk LEFT_CONTROL &sk RIGHT_ALT &none &kt LEFT_SHIFT &sl 4 &sl 5 &none
&none &none &none &none &to 7 &none &none &none &none &none
&none &none &none &none
>;

label = "modifiers";
};

symbols {
bindings = <
&kp N7 &kp N5 &kp N3 &kp N1 &kp N9 &kp N0 &kp N2 &kp N4 &kp N6 &kp N8
&kp LBKT &kp LEFT_BRACE &kp RBRC &kp LPAR &kp EQUAL &kp STAR &kp RPAR &kp PLUS &kp RIGHT_BRACE &kp EXCL
&kp DLLR &kp AMPS &kp BSLH &kp PLUS &kp AT &kp HASH &kp MINUS &kp FSLH &kp UNDERSCORE &kp CARET
&kp BACKSPACE &kp DELETE &trans &trans
&kp N7 &kp N5 &kp N3 &kp N1 &kp N9 &kp N0 &kp N2 &kp N4 &kp N6 &kp N8
&kp LESS_THAN &kp LBKT &kp LEFT_BRACE &kp LPAR &kp CARET &kp PERCENT &kp APOS &kp DOT &kp SEMICOLON &kp ASTERISK
&kp GREATER_THAN &kp RBKT &kp RIGHT_BRACE &kp RIGHT_PARENTHESIS &kp DOLLAR &kp AT &kp DOUBLE_QUOTES &kp COMMA &kp COLON &kp SLASH
&none &none &none &sl 3
>;

label = "symbols";
};

symbols_alt {
symbols_ext {
bindings = <
&kp N7 &kp N5 &kp N3 &kp N1 &kp N9 &kp N0 &kp N2 &kp N4 &kp N6 &kp N8
&kp LBKT &kp LEFT_BRACE &kp RBRC &kp LPAR &kp EQUAL &kp STAR &kp RPAR &kp PLUS &kp RIGHT_BRACE &kp EXCL
&kp DLLR &kp AMPS &kp BSLH &kp PLUS &kp AT &kp HASH &kp MINUS &kp FSLH &kp UNDERSCORE &kp CARET
&trans &trans &trans &trans
&none &none &none &none &none &none &none &none &none &none
&none &kp AMPERSAND &kp UNDERSCORE &kp QUESTION &kp GRAVE &kp HASH &kp EQUAL &kp PLUS &kp ASTERISK &none
&none &kp PIPE &kp TILDE &kp EXCLAMATION &kp BACKSLASH &none &kp PERCENT &kp MINUS &kp SLASH &none
&none &none &none &none
>;

label = "symbols";
label = "symbols_ext";
};

navigation {
bindings = <
&kp F1 &kp F2 &kp F3 &kp F4 &kp PRINTSCREEN &none &kp K_COPY &kp K_PASTE &kp K_CUT &none
&kp F5 &kp F6 &kp F7 &kp F8 &kp SCROLLLOCK &kp TAB &kp LEFT &kp DOWN &kp UP &kp RIGHT
&kp F9 &kp F10 &kp F11 &kp F12 &kp C_PAUSE &none &kp HOME &kp PAGE_DOWN &kp PAGE_UP &kp END
&trans &trans &trans &trans
&kp F1 &kp F2 &kp F3 &kp F4 &kp PRINTSCREEN &kp BACKSPACE &kp K_COPY &kp K_PASTE &kp K_CUT &kp DELETE
&kp F5 &kp F6 &kp F7 &kp F8 &kp SCROLLLOCK &kp TAB &kp LEFT &kp DOWN &kp UP &kp RIGHT
&kp F9 &kp F10 &kp F11 &kp F12 &kp C_PAUSE &kp ENTER &kp HOME &kp PAGE_DOWN &kp PAGE_UP &kp END
&tog 4 &trans &trans &trans
>;

label = "navigation";
};

numpad {
bindings = <
&ext_power EP_TOG &kp K_MUTE &kp C_VOLUME_DOWN &kp C_VOLUME_UP &bt BT_CLR &kp FSLH &kp N7 &kp N8 &kp N9 &kp MINUS
&kp K_PREVIOUS &kp K_NEXT &kp K_PLAY_PAUSE &kp K_STOP &none &kp STAR &kp N4 &kp N5 &kp N6 &kp PLUS
&bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp COMMA &kp N1 &kp N2 &kp N3 &kp DOT
&trans &trans &lt 1 SPACE &trans
&kp TAB &kp ENTER &kp BACKSPACE &none &none &kp FSLH &kp NUMBER_7 &kp NUMBER_8 &kp NUMBER_9 &kp MINUS
&none &none &none &kp EQUAL &kp KP_NUMLOCK &kp STAR &kp NUMBER_4 &kp NUMBER_5 &kp NUMBER_6 &kp PLUS
&none &none &none &none &none &kp COMMA &kp NUMBER_1 &kp NUMBER_2 &kp NUMBER_3 &kp DOT
&tog 5 &kp ESCAPE &kp SPACE &kp NUMBER_0
>;

label = "numpad";
};

qwerty {
bindings = <
&kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P
&mt LEFT_META A &mt LEFT_SHIFT S &mt LEFT_CONTROL D &mt LEFT_ALT F &kp G &kp H &mt RIGHT_ALT J &mt RIGHT_CONTROL K &mt RIGHT_SHIFT L &mt RIGHT_META SEMI
&kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH
&kp ESCAPE &kp TAB &lt 1 SPACE &kp ENTER
&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 FSLH
&sl 1 &kp TAB &kp SPACE &sl 2
>;
};

gaming {
bindings = <
&kp ESC &kp Q &kp W &kp E &kp R &trans &trans &trans &trans &trans
&kp LSHFT &kp A &kp S &kp D &kp F &trans &trans &trans &trans &trans
&kp LCTRL &kp Z &kp X &kp C &kp V &trans &trans &trans &trans &trans
&kp LALT &kp SPACE &trans &trans
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O
&kp LSHFT &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L
&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp P &kp FSLH
&kp LALT &kp SPACE &tog 5 &to 0
>;

label = "gaming";
};

special {
bindings = <
&none &kp K_MUTE &kp C_VOLUME_DOWN &kp C_VOLUME_UP &bootloader &bootloader &none &none &ext_power EP_TOG &bt BT_CLR
&kp K_STOP &kp K_PREVIOUS &kp K_PLAY_PAUSE &kp K_NEXT &sys_reset &sys_reset &none &none &none &none
&none &none &none &none &none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4
&tog 8 &trans &trans &trans
>;

label = "special";
};
};
};
17 changes: 17 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

echo "put the nice!nano into bootloader, flashing in 5 seconds..."
sleep 5
echo "flashing..."

unzip -o -q $(find .tmp -name *.zip) -d .tmp/

mkdir .tmp/nicenano/
sudo mount /dev/sda .tmp/nicenano/

sudo rm -f .tmp/nicenano/CURRENT.UF2
sudo cp $(find .tmp -name *left*) .tmp/nicenano/CURRENT.UF2

sudo umount .tmp/nicenano/

rm -rf .tmp/*