Skip to content

Commit

Permalink
add blank slate with zmk studio enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Roe committed Nov 15, 2024
1 parent 5895a58 commit e3454e7
Show file tree
Hide file tree
Showing 4 changed files with 155 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
#
---
include:
- board: puchi_ble_v1
shield: two_percent_milk
# - board: puchi_ble_v1
# shield: two_percent_milk
- board: lpgalaxy_blank_slate
snippet: studio-rpc-usb-uart
- board: seeeduino_xiao_ble
shield: forager_left rgbled_adapter
snippet: studio-rpc-usb-uart
Expand Down
3 changes: 3 additions & 0 deletions config/lpgalaxy_blank_slate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Comment out to disable soft-off, or if using a different branch without soft-off support
CONFIG_ZMK_PM_SOFT_OFF=y
CONFIG_ZMK_STUDIO=y
143 changes: 143 additions & 0 deletions config/lpgalaxy_blank_slate.keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
/*
* Copyright (c) 2022 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/outputs.h>

#define QWERTY_BASE 1

#define TBLE_ORTHO 1
// #define TBLE_MIT 1
// #define TBLE_DUAL_2U 1

#define NAV_L 1
#define NUM_L 2
#define SYM_L 3

// Using layer taps on thumbs, having quick tap as well helps w/ repeating space/backspace
&lt { quick_tap_ms = <200>; };

#define BT(n) BT_SEL n

/ {
chosen {
zmk,physical-layout =
#ifdef TBLE_DUAL_2U
&layout_ortho_4x12_2x2u;
#elif defined(TBLE_MIT)
&layout_ortho_4x12_1x2u;
#else
&layout_ortho_4x12_all1u;
#endif
};

macros {
ZMK_MACRO(thumbs_up,
wait-ms = <1>;
tap-ms = <5>;
bindings = <&kp PLUS &kp COLON &kp PLUS &kp N1 &kp COLON &kp RET>;
)
};

tap_dances {
shifty: shift_caps_word {
compatible = "zmk,behavior-tap-dance";
label = "TD_SHIFTY";
#binding-cells = <0>;
tapping-term-ms = <150>;
bindings = <&kp LSHFT>, <&caps_word>;
};
};

// Conditional layer only when we have less thumb keys
#ifdef TBLE_DUAL_2U
cond_layers {
compatible = "zmk,conditional-layers";
tri {
if-layers = <NUM_L NAV_L>;
then-layer = <SYM_L>;
};
};
#endif

keymap {
compatible = "zmk,keymap";

base_layer {
label = "Base";
bindings = <
#ifdef QWERTY_BASE
&kp ESC &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BKSP
&kp TAB &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp QUOT
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RET
#else
&kp ESC &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp QUOT &kp BKSP
&kp TAB &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &kp QUOT
&kp LSHFT &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp SEMI &kp RET
#endif
#ifdef TBLE_DUAL_2U
&kp LCTRL &kp LGUI &kp LALT &mo NAV_L &shifty &kp SPACE &mo NUM_L &kp LALT &kp RGUI &kp RSHIFT
#elif defined(TBLE_MIT)
&kp LCTRL &mo SYM_L &kp LGUI &kp LALT &mo NAV_L &kp SPACE &mo NUM_L &kp LEFT &kp UP &kp DOWN &kp RIGHT
#else
&kp LCTRL &mo SYM_L &kp LGUI &kp LALT &mo NAV_L &kp SPACE &kp RET &mo NUM_L &kp LEFT &kp UP &kp DOWN &kp RIGHT
#endif
>;
};

nav_layer {
label = "Nav";
bindings = <
&bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DEL
&trans &trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans
&trans &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &trans
#ifdef TBLE_DUAL_2U
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
#elif defined(TBLE_MIT)
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
#else
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
#endif
>;
};

num_layer {
label = "Num";
bindings = <
&trans &kp LBKT &trans &trans &trans &kp RBKT &kp C_PREV &kp N7 &kp N8 &kp N9 &trans &trans
&trans &kp MINUS &trans &trans &trans &kp EQUAL &kp C_NEXT &kp N4 &kp N5 &kp N6 &trans &trans
&trans &kp GRAVE &trans &trans &trans &kp BSLH &trans &kp N1 &kp N2 &kp N3 &trans &trans
#ifdef TBLE_DUAL_2U
&trans &trans &trans &kp N0 &trans &trans &trans &trans &trans &trans
#elif defined(TBLE_MIT)
&trans &trans &trans &kp N0 &trans &none &trans &kp DEL &trans &trans &trans
#else
&trans &trans &trans &kp N0 &trans &none &none &kp ESC &kp DEL &trans &trans &trans
#endif
>;
};

sym_layer {
label = "Sym";
bindings = <
&studio_unlock &kp LBRC &kp AMPS &kp STAR &kp LPAR &kp RBRC &trans &trans &trans &trans &trans &bootloader
&trans &kp COLON &kp DLLR &kp PRCNT &kp CARET &kp PLUS &trans &trans &trans &trans &trans &trans
&trans &kp TILDE &kp EXCL &kp AT &kp HASH &kp PIPE &trans &trans &trans &trans &trans &trans
#ifdef TBLE_DUAL_2U
&trans &trans &trans &kp RPAR &trans &trans &trans &trans &trans &trans
#elif defined(TBLE_MIT)
&trans &trans &trans &kp RPAR &trans &trans &trans &trans &trans &trans &trans
#else
&trans &trans &trans &kp RPAR &trans &trans &trans &trans &trans &trans &trans &trans
#endif
>;
};


};
};
5 changes: 5 additions & 0 deletions config/west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: petejohanson
url-base: https://github.com/petejohanson
- name: carrefinho
url-base: https://github.com/carrefinho
- name: caksoylar
Expand All @@ -13,6 +15,9 @@ manifest:
remote: zmkfirmware
revision: main
import: app/west.yml
- name: blank-slate-zmk-module
remote: petejohanson
revision: main
- name: forager-zmk-module
remote: carrefinho
revision: studio
Expand Down

0 comments on commit e3454e7

Please sign in to comment.