From bc985874a54212455858ca3ab8dcd86eb58ebb1e Mon Sep 17 00:00:00 2001 From: Allister MacLeod Date: Fri, 29 Nov 2024 16:26:39 -0500 Subject: [PATCH] Adding Hummingbird stuff (actually a Tern BLE). Just testing hardware for now; I will make a better keymap later. --- Makefile | 9 +++- build.yaml | 3 ++ config/hummingbird.keymap | 97 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 config/hummingbird.keymap diff --git a/Makefile b/Makefile index 13763a5..ed10088 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ .PHONY: corne corne_left corne_right .PHONY: ferris cradio_left cradio_right .PHONY: lily58 lily58_left lily58_right +.PHONY: tern hummingbird .PHONY: weejock .PHONY: zaphod zaphod_lite .PHONY: deploy_corne deploy_ferris deploy_lily58 deploy_weejock deploy_zaphod @@ -26,7 +27,7 @@ XIAO_PATH := /media/${USER}/XIAO-SENSE NANO_PATH := /media/${USER}/NICENANO WIN_DESKTOP := /mnt/c/Users/${USER}/Desktop -KBD_PARTS := corne_left corne_right cradio_left cradio_right lily58_left lily58_right weejock zaphod_lite +KBD_PARTS := corne_left corne_right cradio_left cradio_right hummingbird lily58_left lily58_right weejock zaphod_lite all: corne ferris weejock zaphod @@ -75,6 +76,12 @@ deploy_lily58: lily58 @echo cp -v ${BUILD_DIR}/$^_right/zephyr/zmk.uf2 ${NANO_PATH}/ +tern: hummingbird +hummingbird: EXTRA_MODULES += ${ZMK_AUTO_LAYER_DIR} ${ZMK_TRI_STATE_DIR} +hummingbird: + cd ${APP_DIR} && west build -d build/$@ -b seeeduino_xiao_ble ${SNIPPETS} -- -DSHIELD=$@ -DZMK_CONFIG=${ZMK_CONFIG_DIR} -DZMK_EXTRA_MODULES="$(subst $(SPACE),;,$(EXTRA_MODULES))" + + weejock: EXTRA_MODULES += ${WEEJOCK_CONFIG_DIR} weejock: cd ${APP_DIR} && west build -d build/$@ -b seeeduino_xiao_ble -S studio-rpc-usb-uart -- -DSHIELD=$@ -DCONFIG_ZMK_STUDIO=y -DZMK_CONFIG=${ZMK_CONFIG_DIR}/config -DZMK_EXTRA_MODULES="$(subst $(SPACE),;,$(EXTRA_MODULES))" diff --git a/build.yaml b/build.yaml index fb00db3..f3f8006 100644 --- a/build.yaml +++ b/build.yaml @@ -40,3 +40,6 @@ include: - board: seeeduino_xiao_ble shield: weejock snippet: studio-rpc-usb-uart + + - board: seeeduino_xiao_ble + shield: hummingbird diff --git a/config/hummingbird.keymap b/config/hummingbird.keymap new file mode 100644 index 0000000..4e14f38 --- /dev/null +++ b/config/hummingbird.keymap @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +#define DEF_L 0 +#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 +< { quick-tap-ms = <200>; }; + +/ { + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + #binding-cells = <2>; + tapping-term-ms = <225>; + flavor = "tap-preferred"; + bindings = <&kp>, <&kp>; + }; + }; + + combos { + compatible = "zmk,combos"; + combo_z { + timeout-ms = <50>; + key-positions = <20 21>; + bindings = <&kp Z>; + }; + combo_b { + timeout-ms = <50>; + key-positions = <21 22>; + bindings = <&kp B>; + }; + + combo_y { + timeout-ms = <50>; + key-positions = <23 24>; + bindings = <&kp Y>; + }; + + combo_slash { + timeout-ms = <50>; + key-positions = <24 25>; + bindings = <&kp SLASH>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp Q &kp W &kp E &kp R &kp T &kp H &kp U &kp I &kp O &kp P + &kp A &kp S &kp D &kp F &kp G &kp N &kp J &kp K &kp L &kp SQT + &kp X &kp C &kp V &kp M &kp COMMA &kp DOT + &kp TAB &kp RET &kp SPACE &kp BSPC + >; + }; + + nav_layer { + display-name = "Nav"; + bindings = < + &trans &trans &trans &trans &trans &trans &kp HOME &kp UP &kp PG_UP &trans + &trans &trans &trans &trans &trans &trans &kp LEFT &kp DOWN &kp RIGHT &trans + &trans &trans &trans &kp END &trans &kp PG_DN + &trans &trans &kp ESC &kp DEL + >; + }; + + num_layer { + display-name = "Num"; + bindings = < + &kp LBKT &kp N7 &kp N8 &kp N9 &kp RBKT &trans &trans &trans &trans &trans + &kp SEMI &kp N4 &kp N5 &kp N6 &kp EQUAL &trans &trans &trans &trans &trans + &kp N1 &kp N2 &kp N3 &trans &trans &trans + &kp N0 &kp MINUS &trans &trans + >; + }; + + sym_layer { + display-name = "Sym"; + bindings = < + &kp LBRC &kp LS(N7) &kp LS(N8) &kp LS(N9) &kp RBRC &trans &trans &trans &trans &trans + &kp COLON &kp LS(N4) &kp LS(N5) &kp LS(N6) &kp PLUS &trans &trans &trans &trans &trans + &kp LS(N1) &kp LS(N2) &kp LS(N3) &trans &trans &trans + &kp LS(N0) &kp UNDER &trans &trans + >; + }; + }; +};