aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Sangdahl <[email protected]>2024-02-25 15:34:31 -0700
committerJack Sangdahl <[email protected]>2024-02-25 15:34:31 -0700
commitd8353f5b4c5c8c5f28c9a81506f91ff3092cae0b (patch)
treedf79ce937855ebff4ad2af23f0c7116e2e00c0b7
parent22004dc2c7b090f1f07bf47f114cef730a05a50b (diff)
downloadzmk_build-d8353f5b4c5c8c5f28c9a81506f91ff3092cae0b.tar.gz
zmk_build-d8353f5b4c5c8c5f28c9a81506f91ff3092cae0b.zip
revert
-rwxr-xr-xbuild.sh14
-rw-r--r--config/corne.keymap49
-rw-r--r--config/revxlp.conf1
-rw-r--r--config/revxlp.keymap49
-rw-r--r--config/splitkb_aurora_sweep.keymap41
-rw-r--r--config/user.dtsi52
-rw-r--r--config/util.h34
-rw-r--r--readme.md2
-rw-r--r--revxlp/boards/seeeduino_xiao.conf2
-rw-r--r--revxlp/boards/seeeduino_xiao_ble.overlay14
-rw-r--r--revxlp/revxlp.keymap149
-rw-r--r--revxlp/revxlp.overlay2
12 files changed, 160 insertions, 249 deletions
diff --git a/build.sh b/build.sh
index 749007c..1633b15 100755
--- a/build.sh
+++ b/build.sh
@@ -1,28 +1,26 @@
#!/bin/sh
-ZMK_DIR=~/git/zmk
+ZMK_DIR=~/waffle_git/zmk
RED=$(tput setaf 1)
-GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
+GREEN=$(tput setaf 2)
BLUE=$(tput setaf 4)
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
source $ZMK_DIR/.venv/bin/activate
-set -e
build() {
- printf "building ${GREEN}$1${NORMAL} for $BLUE$2$NORMAL...\n"
+ printf "building $GREEN$1$NORMAL for $BLUE$2$NORMAL...\n"
(cd $ZMK_DIR/app
west build -p always -b $2 -- -DSHIELD=$1 \
- -DZMK_CONFIG="$HOME/git/zmk-build/config" \
+ -DZMK_CONFIG="$HOME/waffle_git/zmk-build/config" \
&> /dev/null
+
read -p "${BOLD}flash? (y/n) $NORMAL" yn
case $yn in
[Yy]*)
printf "${YELLOW}enter bootloader$NORMAL...\n"
sleep 5
- doas mount /dev/sdb ~/.local/Media
- west flash &> /dev/null
- doas umount /dev/sdb
+ west flash
;;
[Nn]*) cp build/zephyr/zmk.uf2 ~/$1.uf2 ;;
* ) printf "${RED}invalid entry$NORMAL\n" ;;
diff --git a/config/corne.keymap b/config/corne.keymap
index 91140e8..9c1ea89 100644
--- a/config/corne.keymap
+++ b/config/corne.keymap
@@ -1,11 +1,14 @@
-// Copyright 2024 jack (@waffle87)
+// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include "util.h"
-#include "user.dtsi"
+
+&lt {
+ tapping-term-ms = <100>;
+};
/ {
keymap {
@@ -36,6 +39,48 @@
};
};
+ behaviors {
+ hm: homerow_mods {
+ compatible = "zmk,behavior-hold-tap";
+ label = "HOMEROW_MODS";
+ #binding-cells = <2>;
+ tapping-term-ms = <130>;
+ quick-tap-ms = <160>;
+ flavor = "tap-preferred";
+ bindings = <&kp>, <&kp>;
+ };
+
+ pnp: play_next_prev {
+ compatible = "zmk,behavior-tap-dance";
+ label = "PLAY_NEXT_PREV";
+ #binding-cells = <0>;
+ tapping-term-ms = <210>;
+ bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
+ };
+ TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE)
+ TAP_DANCE(quot_dquo, &kp SQT, &kp DQT)
+ TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC)
+ TAP_DANCE(brkt, &kp LBKT, &kp RBKT)
+ TAP_DANCE(min_dash, &kp MINUS, &emdash)
+ };
+
+ macros {
+ updir: updir {
+ label = "UP_DIR";
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
+ };
+ emdash: emdash {
+ label = "EM_DASH";
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_press &kp LSHFT &kp LCTRL>,
+ <&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
+ <&macro_release &kp LSHFT &kp LCTRL>;
+ };
+ };
+
combos {
compatible = "zmk,combos";
// name output pos.
diff --git a/config/revxlp.conf b/config/revxlp.conf
index d85021a..dfa521c 100644
--- a/config/revxlp.conf
+++ b/config/revxlp.conf
@@ -1,2 +1 @@
CONFIG_ZMK_SLEEP=y
-CONFIG_ZMK_USB_LOGGING=n
diff --git a/config/revxlp.keymap b/config/revxlp.keymap
index 91140e8..9c1ea89 100644
--- a/config/revxlp.keymap
+++ b/config/revxlp.keymap
@@ -1,11 +1,14 @@
-// Copyright 2024 jack (@waffle87)
+// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include "util.h"
-#include "user.dtsi"
+
+&lt {
+ tapping-term-ms = <100>;
+};
/ {
keymap {
@@ -36,6 +39,48 @@
};
};
+ behaviors {
+ hm: homerow_mods {
+ compatible = "zmk,behavior-hold-tap";
+ label = "HOMEROW_MODS";
+ #binding-cells = <2>;
+ tapping-term-ms = <130>;
+ quick-tap-ms = <160>;
+ flavor = "tap-preferred";
+ bindings = <&kp>, <&kp>;
+ };
+
+ pnp: play_next_prev {
+ compatible = "zmk,behavior-tap-dance";
+ label = "PLAY_NEXT_PREV";
+ #binding-cells = <0>;
+ tapping-term-ms = <210>;
+ bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
+ };
+ TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE)
+ TAP_DANCE(quot_dquo, &kp SQT, &kp DQT)
+ TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC)
+ TAP_DANCE(brkt, &kp LBKT, &kp RBKT)
+ TAP_DANCE(min_dash, &kp MINUS, &emdash)
+ };
+
+ macros {
+ updir: updir {
+ label = "UP_DIR";
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
+ };
+ emdash: emdash {
+ label = "EM_DASH";
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_press &kp LSHFT &kp LCTRL>,
+ <&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
+ <&macro_release &kp LSHFT &kp LCTRL>;
+ };
+ };
+
combos {
compatible = "zmk,combos";
// name output pos.
diff --git a/config/splitkb_aurora_sweep.keymap b/config/splitkb_aurora_sweep.keymap
index 9e7600c..720ffb1 100644
--- a/config/splitkb_aurora_sweep.keymap
+++ b/config/splitkb_aurora_sweep.keymap
@@ -1,11 +1,14 @@
-// Copyright 2024 jack (@waffle87)
+// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: MIT
#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include "util.h"
-#include "user.dtsi"
+
+&lt {
+ tapping-term-ms = <100>;
+};
/ {
keymap {
@@ -35,7 +38,39 @@
>;
};
};
-
+ macros {
+ emdash: emdash {
+ label = "EM_DASH";
+ compatible = "zmk,behavior-macro";
+ #binding-cells = <0>;
+ bindings = <&macro_press &kp LSHFT &kp LCTRL>,
+ <&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
+ <&macro_release &kp LSHFT &kp LCTRL>;
+ };
+ };
+ behaviors {
+ hm: homerow_mods {
+ compatible = "zmk,behavior-hold-tap";
+ label = "HOMEROW_MODS";
+ #binding-cells = <2>;
+ tapping-term-ms = <130>;
+ quick-tap-ms = <160>;
+ flavor = "tap-preferred";
+ bindings = <&kp>, <&kp>;
+ };
+ pnp: play_next_prev {
+ compatible = "zmk,behavior-tap-dance";
+ label = "PLAY_NEXT_PREV";
+ #binding-cells = <0>;
+ tapping-term-ms = <210>;
+ bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
+ };
+ TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE)
+ TAP_DANCE(quot_dquo, &kp SQT, &kp DQT)
+ TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC)
+ TAP_DANCE(brkt, &kp LBKT, &kp RBKT)
+ TAP_DANCE(min_dash, &kp MINUS, &emdash)
+ };
combos {
compatible = "zmk,combos";
// name output pos.
diff --git a/config/user.dtsi b/config/user.dtsi
deleted file mode 100644
index 8496d07..0000000
--- a/config/user.dtsi
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2024 jack (@waffle87)
-// SPDX-License-Identifier: MIT
-
-&lt {
- tapping-term-ms = <100>;
-};
-
-\ {
- behaviors {
- hm: homerow_mods {
- compatible = "zmk,behavior-hold-tap";
- label = "HOMEROW_MODS";
- #binding-cells = <2>;
- tapping-term-ms = <130>;
- quick-tap-ms = <160>;
- flavor = "tap-preferred";
- bindings = <&kp>, <&kp>;
- };
-
- pnp: play_next_prev {
- compatible = "zmk,behavior-tap-dance";
- label = "PLAY_NEXT_PREV";
- #binding-cells = <0>;
- tapping-term-ms = <210>;
- bindings = <&kp C_PLAY>, <&kp C_NEXT>, <&kp C_PREV>;
- };
- TAP_DANCE(bsls_pipe, &kp BSLH, &kp PIPE)
- TAP_DANCE(quot_dquo, &kp SQT, &kp DQT)
- TAP_DANCE(cbrkt, &kp LBRC, &kp RBRC)
- TAP_DANCE(brkt, &kp LBKT, &kp RBKT)
- TAP_DANCE(min_dash, &kp MINUS, &emdash)
- };
-
- macros {
- updir: updir {
- label = "UP_DIR";
- compatible = "zmk,behavior-macro";
- #binding-cells = <0>;
- bindings = <&macro_tap &kp DOT &kp DOT &kp FSLH>;
- };
- emdash: emdash {
- label = "EM_DASH";
- compatible = "zmk,behavior-macro";
- #binding-cells = <0>;
- bindings = <&macro_press &kp LSHFT &kp LCTRL>,
- <&macro_tap &kp U &kp N2 &kp N0 &kp N1 &kp N4>,
- <&macro_release &kp LSHFT &kp LCTRL>;
- };
- };
-
-
-}
diff --git a/config/util.h b/config/util.h
index b6fe42a..e8b33a9 100644
--- a/config/util.h
+++ b/config/util.h
@@ -1,21 +1,21 @@
-// Copyright 2024 jack (@waffle87)
+// Copyright 2022 jack (@waffle87)
// SPDX-License-Identifier: MIT
-#define COMBO(name, keypress, keypos) \
- combo_##name { \
- timeout - ms = <50>; \
- bindings = <keypress>; \
- key - positions = <keypos>; \
- };
+#define COMBO(name, keypress, keypos) \
+combo_##name { \
+ timeout-ms = <50>; \
+ bindings = <keypress>; \
+ key-positions = <keypos>; \
+};
-#define TAP_DANCE(name, keypress1, keypress2) \
- td_##name : name { \
- compatible = "zmk,behavior-tap-dance"; \
- label = ## #name; \
- #binding - cells = <0>; \
- tapping - term - ms = <200>; \
- bindings = <keypress1>, <keypress2>; \
- };
+#define TAP_DANCE(name, keypress1, keypress2) \
+td_##name: name { \
+ compatible = "zmk,behavior-tap-dance"; \
+ label = ###name; \
+ #binding-cells = <0>; \
+ tapping-term-ms = <200>; \
+ bindings = <keypress1>, <keypress2>; \
+};
-#define HRML(k1, k2, k3, k4) &hm LALT k1 &hm LGUI k2 &hm LCTRL k3 &hm LSHFT k4
-#define HRMR(k1, k2, k3, k4) &hm RSHFT k1 &hm RCTRL k2 &hm RGUI k3 &hm RALT k4
+#define HRML(k1,k2,k3,k4) &hm LALT k1 &hm LGUI k2 &hm LCTRL k3 &hm LSHFT k4
+#define HRMR(k1,k2,k3,k4) &hm RSHFT k1 &hm RCTRL k2 &hm RGUI k3 &hm RALT k4
diff --git a/readme.md b/readme.md
index 4d2a569..06d6703 100644
--- a/readme.md
+++ b/readme.md
@@ -1,7 +1,7 @@
### zmk build repository
my [zmk](https://zmk.dev) configuration & keyboard code
-![revxlp](https://i.imgur.com/bCRPsDyh.jpg)
+![keyboard](https://i.imgur.com/bCRPsDyh.jpg)
### misc
* [`util.h`](util.h) contains some simple c macros for combos, 2-key tap dance, & home-row mods.
diff --git a/revxlp/boards/seeeduino_xiao.conf b/revxlp/boards/seeeduino_xiao.conf
deleted file mode 100644
index 81b8cd7..0000000
--- a/revxlp/boards/seeeduino_xiao.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_SPI=y
-CONFIG_ZMK_KSCAN_MATRIX_POLLING=y
diff --git a/revxlp/boards/seeeduino_xiao_ble.overlay b/revxlp/boards/seeeduino_xiao_ble.overlay
index 5b37ffb..5cd88ae 100644
--- a/revxlp/boards/seeeduino_xiao_ble.overlay
+++ b/revxlp/boards/seeeduino_xiao_ble.overlay
@@ -1,13 +1,3 @@
-&spi2_default {
- group1 {
- psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
- <NRF_PSEL(SPIM_MOSI, 1, 15)>;
- };
-};
-
-&spi2_sleep {
- group1 {
- psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
- <NRF_PSEL(SPIM_MOSI, 1, 15)>;
- };
+&xiao_spi {
+ miso-pin = <6>;
};
diff --git a/revxlp/revxlp.keymap b/revxlp/revxlp.keymap
deleted file mode 100644
index e22fd49..0000000
--- a/revxlp/revxlp.keymap
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) 2024 The ZMK Contributors
- *
- * SPDX-License-Identifier: MIT
- */
-
-#include <behaviors.dtsi>
-#include <dt-bindings/zmk/keys.h>
-#include <dt-bindings/zmk/bt.h>
-#include <dt-bindings/zmk/backlight.h>
-
-#define NAV_L 1
-#define NUM_L 2
-#define MED_L 3
-#define FUN_L 4
-
-/ {
- tap_dances {
- shifty: shift_caps_word {
- compatible = "zmk,behavior-tap-dance";
- #binding-cells = <0>;
- tapping-term-ms = <150>;
- bindings = <&kp LSHFT>, <&caps_word>;
- };
- };
-
- cond_layers {
- compatible = "zmk,conditional-layers";
- tri {
- if-layers = <NUM_L NAV_L>;
- then-layer = <MED_L>;
- };
- };
-
- combos {
- compatible = "zmk,combos";
-
- l_curly_bracket {
- timeout-ms = <50>;
- key-positions = <2 14>;
- bindings = <&kp LS(LBKT)>;
- layers = <NUM_L>;
- };
-
- r_curly_bracket {
- timeout-ms = <50>;
- key-positions = <4 16>;
- bindings = <&kp LS(RBKT)>;
- layers = <NUM_L>;
- };
-
- lbracket {
- timeout-ms = <50>;
- key-positions = <14 26>;
- bindings = <&kp LBKT>;
- layers = <NUM_L>;
- };
-
- rbracket {
- timeout-ms = <50>;
- key-positions = <16 28>;
- bindings = <&kp RBKT>;
- layers = <NUM_L>;
- };
-
- ques_mark_combo {
- timeout-ms = <50>;
- key-positions = <21 33>;
- bindings = <&kp LS(FSLH)>;
- };
-
- bslash_combo {
- timeout-ms = <50>;
- key-positions = <10 22>;
- bindings = <&kp BSLH>;
- };
-
- fslash_combo {
- timeout-ms = <50>;
- key-positions = <22 34>;
- bindings = <&kp FSLH>;
- };
-
- bootloader_combo {
- timeout-ms = <50>;
- key-positions = <5 6>;
- bindings = <&bootloader>;
- layers = <MED_L>;
- };
-
- gui_combo {
- timeout-ms = <50>;
- key-positions = <16 19>;
- bindings = <&kp LGUI>;
- layers = <MED_L>;
- };
- };
-
- keymap {
- compatible = "zmk,keymap";
-
-#ifdef QWERTY_BASE
- qwerty_layer {
- bindings = <
- &none &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &none
- &none &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp QUOT &none
- &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp SEMI &none
- &none &mo NAV_L &shifty &kp SPACE &mo NUM_L &none
- >;
- };
-#else
- colemak_dhm_layer {
- bindings = <
- &none &kp Q &kp W &kp F &kp P &kp B &kp J &kp L &kp U &kp Y &kp QUOT &none
- &none &kp A &kp R &kp S &kp T &kp G &kp M &kp N &kp E &kp I &kp O &none
- &none &kp Z &kp X &kp C &kp D &kp V &kp K &kp H &kp COMMA &kp DOT &kp SEMI &none
- &none &mo NAV_L &shifty &kp SPACE &mo NUM_L &none
- >;
- };
-#endif
-
- nav_layer {
- bindings = <
- &none &trans &trans &trans &trans &trans &kp GRAVE &kp TAB &kp GRAVE &kp BKSP &kp DEL &none
- &none &sk LSHFT &sk LALT &sk LCTRL &sk LGUI &trans &kp TAB &kp LARW &kp DARW &kp UARW &kp RARW &none
- &none &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_DN &kp PG_UP &kp END &none
- &none &trans &trans &kp RET &trans &none
- >;
- };
-
- num_layer {
- bindings = <
- &none &kp ESC &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans &none
- &none &kp MINUS &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &sk LGUI &sk LCTRL &sk LALT &sk LSHFT &none
- &none &kp PLUS &kp N1 &kp N2 &kp N3 &kp N0 &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none
- &none &trans &trans &trans &trans &none
- >;
- };
-
- media_layer {
- bindings = <
- &bt BT_CLR &trans &trans &trans &trans &trans &trans &kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_NEXT &none
- &none &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &none
- &none &trans &trans &trans &trans &trans &trans &trans &kp C_PLAY_PAUSE &kp C_MUTE &trans &none
- &none &trans &trans &trans &trans &none
- >;
- };
- };
-};
diff --git a/revxlp/revxlp.overlay b/revxlp/revxlp.overlay
index 53faae0..c9a3600 100644
--- a/revxlp/revxlp.overlay
+++ b/revxlp/revxlp.overlay
@@ -14,6 +14,7 @@
gpio-controller;
spi-max-frequency = <200000>;
reg = <0>;
+ label = "4HC595";
#gpio-cells = <2>;
ngpios = <8>;
};
@@ -40,6 +41,7 @@ RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(5,5) RC(5,4) RC(5,3) RC(5,2)
kscan0: kscan_0 {
compatible = "zmk,kscan-gpio-matrix";
+ label = "KSCAN";
diode-direction = "col2row";
col-gpios