From e68f4aed55eb8589a9f53b5ca205b61b4cc0b2c2 Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Mon, 30 Mar 2026 13:00:18 +0200 Subject: [PATCH] new keyboard: 60% ANSI qwerty --- boards/shields/keeb60_3d/Kconfig.defconfig | 6 ++ boards/shields/keeb60_3d/Kconfig.shield | 2 + .../shields/keeb60_3d/keeb60_3d-layouts.dtsi | 86 +++++++++++++++++++ boards/shields/keeb60_3d/keeb60_3d.conf | 17 ++++ boards/shields/keeb60_3d/keeb60_3d.keymap | 28 ++++++ boards/shields/keeb60_3d/keeb60_3d.overlay | 59 +++++++++++++ boards/shields/keeb60_3d/keeb60_3d.zmk.yml | 20 +++++ build.yaml | 3 + 8 files changed, 221 insertions(+) create mode 100644 boards/shields/keeb60_3d/Kconfig.defconfig create mode 100644 boards/shields/keeb60_3d/Kconfig.shield create mode 100644 boards/shields/keeb60_3d/keeb60_3d-layouts.dtsi create mode 100644 boards/shields/keeb60_3d/keeb60_3d.conf create mode 100644 boards/shields/keeb60_3d/keeb60_3d.keymap create mode 100644 boards/shields/keeb60_3d/keeb60_3d.overlay create mode 100644 boards/shields/keeb60_3d/keeb60_3d.zmk.yml diff --git a/boards/shields/keeb60_3d/Kconfig.defconfig b/boards/shields/keeb60_3d/Kconfig.defconfig new file mode 100644 index 0000000..43447c9 --- /dev/null +++ b/boards/shields/keeb60_3d/Kconfig.defconfig @@ -0,0 +1,6 @@ +if SHIELD_KEEB60_3D + +config ZMK_KEYBOARD_NAME + default "keeb60_3d" + +endif # SHIELD_KEEB60_3D diff --git a/boards/shields/keeb60_3d/Kconfig.shield b/boards/shields/keeb60_3d/Kconfig.shield new file mode 100644 index 0000000..1bde5a1 --- /dev/null +++ b/boards/shields/keeb60_3d/Kconfig.shield @@ -0,0 +1,2 @@ +config SHIELD_KEEB60_3D + def_bool $(shields_list_contains,keeb60_3d) diff --git a/boards/shields/keeb60_3d/keeb60_3d-layouts.dtsi b/boards/shields/keeb60_3d/keeb60_3d-layouts.dtsi new file mode 100644 index 0000000..dad64c6 --- /dev/null +++ b/boards/shields/keeb60_3d/keeb60_3d-layouts.dtsi @@ -0,0 +1,86 @@ +// See https://zmk.dev/docs/development/hardware-integration/physical-layouts +// for how to configure this. + +#include + +/ { + default_layout: default_layout { + compatible = "zmk,physical-layout"; + display-name = "ANSI 60%"; + transform = <&default_transform>; + kscan = <&kscan>; + + // Row 0: ` 1 2 3 4 5 6 7 8 9 0 - = Backspace + // Row 1: Tab Q W E R T Y U I O P [ ] \ + // Row 2: Caps A S D F G H J K L ; ' Enter + // Row 3: Shift Z X C V B N M , . / Shift + // Row 4: Ctrl Menu Alt Space Alt Fn Menu Ctrl + keys + = <&key_physical_attrs 100 100 0 0 0 0 0> /* ` */ + , <&key_physical_attrs 100 100 100 0 0 0 0> /* 1 */ + , <&key_physical_attrs 100 100 200 0 0 0 0> /* 2 */ + , <&key_physical_attrs 100 100 300 0 0 0 0> /* 3 */ + , <&key_physical_attrs 100 100 400 0 0 0 0> /* 4 */ + , <&key_physical_attrs 100 100 500 0 0 0 0> /* 5 */ + , <&key_physical_attrs 100 100 600 0 0 0 0> /* 6 */ + , <&key_physical_attrs 100 100 700 0 0 0 0> /* 7 */ + , <&key_physical_attrs 100 100 800 0 0 0 0> /* 8 */ + , <&key_physical_attrs 100 100 900 0 0 0 0> /* 9 */ + , <&key_physical_attrs 100 100 1000 0 0 0 0> /* 0 */ + , <&key_physical_attrs 100 100 1100 0 0 0 0> /* - */ + , <&key_physical_attrs 100 100 1200 0 0 0 0> /* = */ + , <&key_physical_attrs 200 100 1300 0 0 0 0> /* Backspace */ + + , <&key_physical_attrs 150 100 50 100 0 0 0> /* Tab */ + , <&key_physical_attrs 100 100 200 100 0 0 0> /* Q */ + , <&key_physical_attrs 100 100 300 100 0 0 0> /* W */ + , <&key_physical_attrs 100 100 400 100 0 0 0> /* E */ + , <&key_physical_attrs 100 100 500 100 0 0 0> /* R */ + , <&key_physical_attrs 100 100 600 100 0 0 0> /* T */ + , <&key_physical_attrs 100 100 700 100 0 0 0> /* Y */ + , <&key_physical_attrs 100 100 800 100 0 0 0> /* U */ + , <&key_physical_attrs 100 100 900 100 0 0 0> /* I */ + , <&key_physical_attrs 100 100 1000 100 0 0 0> /* O */ + , <&key_physical_attrs 100 100 1100 100 0 0 0> /* P */ + , <&key_physical_attrs 100 100 1200 100 0 0 0> /* [ */ + , <&key_physical_attrs 100 100 1300 100 0 0 0> /* ] */ + , <&key_physical_attrs 150 100 1400 100 0 0 0> /* \ */ + + , <&key_physical_attrs 175 100 75 200 0 0 0> /* Caps */ + , <&key_physical_attrs 100 100 250 200 0 0 0> /* A */ + , <&key_physical_attrs 100 100 350 200 0 0 0> /* S */ + , <&key_physical_attrs 100 100 450 200 0 0 0> /* D */ + , <&key_physical_attrs 100 100 550 200 0 0 0> /* F */ + , <&key_physical_attrs 100 100 650 200 0 0 0> /* G */ + , <&key_physical_attrs 100 100 750 200 0 0 0> /* H */ + , <&key_physical_attrs 100 100 850 200 0 0 0> /* J */ + , <&key_physical_attrs 100 100 950 200 0 0 0> /* K */ + , <&key_physical_attrs 100 100 1050 200 0 0 0> /* L */ + , <&key_physical_attrs 100 100 1150 200 0 0 0> /* ; */ + , <&key_physical_attrs 100 100 1250 200 0 0 0> /* ' */ + , <&key_physical_attrs 225 100 1350 200 0 0 0> /* Enter */ + + , <&key_physical_attrs 225 100 125 300 0 0 0> /* Left Shift */ + , <&key_physical_attrs 100 100 350 300 0 0 0> /* Z */ + , <&key_physical_attrs 100 100 450 300 0 0 0> /* X */ + , <&key_physical_attrs 100 100 550 300 0 0 0> /* C */ + , <&key_physical_attrs 100 100 650 300 0 0 0> /* V */ + , <&key_physical_attrs 100 100 750 300 0 0 0> /* B */ + , <&key_physical_attrs 100 100 850 300 0 0 0> /* N */ + , <&key_physical_attrs 100 100 950 300 0 0 0> /* M */ + , <&key_physical_attrs 100 100 1050 300 0 0 0> /* , */ + , <&key_physical_attrs 100 100 1150 300 0 0 0> /* . */ + , <&key_physical_attrs 100 100 1250 300 0 0 0> /* / */ + , <&key_physical_attrs 275 100 1350 300 0 0 0> /* Right Shift */ + + , <&key_physical_attrs 125 100 0 400 0 0 0> /* Ctrl */ + , <&key_physical_attrs 125 100 125 400 0 0 0> /* Left Menu */ + , <&key_physical_attrs 125 100 250 400 0 0 0> /* Alt */ + , <&key_physical_attrs 625 100 375 400 0 0 0> /* Space */ + , <&key_physical_attrs 125 100 1000 400 0 0 0> /* Alt */ + , <&key_physical_attrs 125 100 1125 400 0 0 0> /* Fn */ + , <&key_physical_attrs 125 100 1250 400 0 0 0> /* Right Menu */ + , <&key_physical_attrs 125 100 1375 400 0 0 0> /* Ctrl */ + ; + }; +}; diff --git a/boards/shields/keeb60_3d/keeb60_3d.conf b/boards/shields/keeb60_3d/keeb60_3d.conf new file mode 100644 index 0000000..e55bb27 --- /dev/null +++ b/boards/shields/keeb60_3d/keeb60_3d.conf @@ -0,0 +1,17 @@ +CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y + +CONFIG_ZMK_USB=y + +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 + +CONFIG_ZMK_BLE=y +CONFIG_BT=y +CONFIG_BT_PERIPHERAL=y +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y + +CONFIG_BT_MAX_CONN=10 +CONFIG_BT_MAX_PAIRED=10 + +CONFIG_ZMK_STUDIO_LOCKING=n +CONFIG_ZMK_STUDIO=y diff --git a/boards/shields/keeb60_3d/keeb60_3d.keymap b/boards/shields/keeb60_3d/keeb60_3d.keymap new file mode 100644 index 0000000..2c9d717 --- /dev/null +++ b/boards/shields/keeb60_3d/keeb60_3d.keymap @@ -0,0 +1,28 @@ +#include +#include + +/ { + keymap { + compatible = "zmk,keymap"; + + default_layer { + bindings = < + &kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC + &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH + &kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SCLN &kp QUOT &kp RET + &kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMM &kp DOT &kp FSLH &kp RSHFT + &kp LCTL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RGUI &kp RCTL + >; + }; + + fn_layer { + bindings = < + &kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL + &trans &trans &kp UP &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &trans &trans &trans &trans &trans &trans &trans &trans + >; + }; + }; +}; diff --git a/boards/shields/keeb60_3d/keeb60_3d.overlay b/boards/shields/keeb60_3d/keeb60_3d.overlay new file mode 100644 index 0000000..17fe3da --- /dev/null +++ b/boards/shields/keeb60_3d/keeb60_3d.overlay @@ -0,0 +1,59 @@ +#include + +#include "keeb60_3d-layouts.dtsi" + +/ { + chosen { + zmk,kscan = &kscan0; + zmk,physical-layout = &default_layout; + }; + + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + diode-direction = "col2row"; + wakeup-source; + + // Columns + // 017, 020, 022, 024, 100, 011, 104, 106, 101, 102, 107, 009, 010, 111 + col-gpios + = <&pro_micro 17 GPIO_ACTIVE_HIGH> + , <&pro_micro 20 GPIO_ACTIVE_HIGH> + , <&pro_micro 22 GPIO_ACTIVE_HIGH> + , <&pro_micro 24 GPIO_ACTIVE_HIGH> + , <&pro_micro 100 GPIO_ACTIVE_HIGH> + , <&pro_micro 11 GPIO_ACTIVE_HIGH> + , <&pro_micro 104 GPIO_ACTIVE_HIGH> + , <&pro_micro 106 GPIO_ACTIVE_HIGH> + , <&pro_micro 101 GPIO_ACTIVE_HIGH> + , <&pro_micro 102 GPIO_ACTIVE_HIGH> + , <&pro_micro 107 GPIO_ACTIVE_HIGH> + , <&pro_micro 9 GPIO_ACTIVE_HIGH> + , <&pro_micro 10 GPIO_ACTIVE_HIGH> + , <&pro_micro 111 GPIO_ACTIVE_HIGH> + ; + + // Rows + // 113, 115, 002, 029, 031 + row-gpios + = <&pro_micro 113 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 115 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&pro_micro 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + }; + + default_transform: default_transform { + compatible = "zmk,matrix-transform"; + columns = <14>; + rows = <5>; + + map = < + RC(0,13) RC(0,12) RC(0,11) RC(0,10) RC(0,9) RC(0,8) RC(0,7) RC(0,6) RC(0,5) RC(0,4) RC(0,3) RC(0,2) RC(0,1) RC(0,0) + RC(1,13) RC(1,12) RC(1,11) RC(1,10) RC(1,9) RC(1,8) RC(1,7) RC(1,6) RC(1,5) RC(1,4) RC(1,3) RC(1,2) RC(1,1) RC(1,0) + RC(2,13) RC(2,12) RC(2,11) RC(2,10) RC(2,9) RC(2,8) RC(2,7) RC(2,6) RC(2,5) RC(2,4) RC(2,3) RC(2,2) RC(2,1) + RC(3,12) RC(3,11) RC(3,10) RC(3,9) RC(3,8) RC(3,7) RC(3,6) RC(3,5) RC(3,4) RC(3,3) RC(3,2) RC(3,1) + RC(4,13) RC(4,12) RC(4,11) RC(4,10) RC(4,9) RC(4,8) RC(4,7) RC(4,6) + >; + }; +}; diff --git a/boards/shields/keeb60_3d/keeb60_3d.zmk.yml b/boards/shields/keeb60_3d/keeb60_3d.zmk.yml new file mode 100644 index 0000000..e58e1c5 --- /dev/null +++ b/boards/shields/keeb60_3d/keeb60_3d.zmk.yml @@ -0,0 +1,20 @@ +# This file was generated from a template. Edit it to match your keyboard. +# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files +# for instructions. + +file_format: "1" +id: keeb60_3d +name: keeb60_3d +type: shield + +# Set this to a URL that documents the keyboard. +url: https://example.com + +# Add any features your keyboard supports here. +# See https://zmk.dev/docs/development/hardware-integration/hardware-metadata-files#features +features: + - keys + - studio # Remove this line if your keyboard will not support ZMK Studio + +requires: + - pro_micro diff --git a/build.yaml b/build.yaml index 0feefd9..51d6a87 100644 --- a/build.yaml +++ b/build.yaml @@ -22,3 +22,6 @@ include: - board: nice_nano_v2 shield: numpad3d snippet: studio-rpc-usb-uart + - board: nice_nano_v2 + shield: keeb60_3d + snippet: studio-rpc-usb-uart