From 3efec7d63d7b088fd94194073fcdc46aedff25f8 Mon Sep 17 00:00:00 2001 From: AJ <1754228+280Zo@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:46:36 -0800 Subject: [PATCH] initial commit for zmk studio integration --- boards/shields/charybdis-bt/charybdis.dtsi | 2 +- build.yaml | 8 ++-- config/charybdis-layouts.dtsi | 56 ++++++++++++++++++++++ config/charybdis.conf | 14 +++--- config/charybdis.keymap | 6 +-- 5 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 config/charybdis-layouts.dtsi diff --git a/boards/shields/charybdis-bt/charybdis.dtsi b/boards/shields/charybdis-bt/charybdis.dtsi index 77fbed0f..89547a2e 100644 --- a/boards/shields/charybdis-bt/charybdis.dtsi +++ b/boards/shields/charybdis-bt/charybdis.dtsi @@ -1,5 +1,5 @@ #include - +#include "charybdis-layouts.dtsi" / { chosen { zmk,kscan = &kscan0; diff --git a/build.yaml b/build.yaml index ad063482..892bc157 100644 --- a/build.yaml +++ b/build.yaml @@ -29,7 +29,7 @@ include: # keymap: qwerty # format: bt # artifact-name: charybdis_qwerty_right - # # snippet: studio-rpc-usb-uart + # snippet: studio-rpc-usb-uart # Colemak DH BT - board: nice_nano_v2 @@ -42,7 +42,7 @@ include: keymap: colemak_dh format: bt artifact-name: charybdis_colemak_right - # snippet: studio-rpc-usb-uart + snippet: studio-rpc-usb-uart # # QWERTY Dongle # - board: nice_nano_v2 @@ -60,7 +60,7 @@ include: # keymap: qwerty # format: dongle # artifact-name: charybdis_qwerty_dongle - # # snippet: studio-rpc-usb-uart + # snippet: studio-rpc-usb-uart # Colemak DH Dongle - board: nice_nano_v2 @@ -78,7 +78,7 @@ include: keymap: colemak_dh format: dongle artifact-name: charybdis_colemak_dongle - # snippet: studio-rpc-usb-uart + snippet: studio-rpc-usb-uart # Firmware Reset - board: nice_nano_v2 diff --git a/config/charybdis-layouts.dtsi b/config/charybdis-layouts.dtsi new file mode 100644 index 00000000..92fb1c95 --- /dev/null +++ b/config/charybdis-layouts.dtsi @@ -0,0 +1,56 @@ +#include + +/ { + charybdis_physical_layout: charybdis_physical_layout { + compatible = "zmk,physical-layout"; + display-name = "Charybdis"; + transform = <&default_transform>; + kscan = <&kscan0>; + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 36 0 0 0> + , <&key_physical_attrs 100 100 100 36 0 0 0> + , <&key_physical_attrs 100 100 200 11 0 0 0> + , <&key_physical_attrs 100 100 300 -1 0 0 0> + , <&key_physical_attrs 100 100 400 11 0 0 0> + , <&key_physical_attrs 100 100 500 11 0 0 0> + , <&key_physical_attrs 100 100 900 11 0 0 0> + , <&key_physical_attrs 100 100 1000 11 0 0 0> + , <&key_physical_attrs 100 100 1100 -1 0 0 0> + , <&key_physical_attrs 100 100 1200 11 0 0 0> + , <&key_physical_attrs 100 100 1300 36 0 0 0> + , <&key_physical_attrs 100 100 1400 36 0 0 0> + + , <&key_physical_attrs 100 100 0 136 0 0 0> + , <&key_physical_attrs 100 100 100 136 0 0 0> + , <&key_physical_attrs 100 100 200 111 0 0 0> + , <&key_physical_attrs 100 100 300 98 0 0 0> + , <&key_physical_attrs 100 100 400 111 0 0 0> + , <&key_physical_attrs 100 100 500 111 0 0 0> + , <&key_physical_attrs 100 100 900 111 0 0 0> + , <&key_physical_attrs 100 100 1000 111 0 0 0> + , <&key_physical_attrs 100 100 1100 98 0 0 0> + , <&key_physical_attrs 100 100 1200 111 0 0 0> + , <&key_physical_attrs 100 100 1300 136 0 0 0> + , <&key_physical_attrs 100 100 1400 136 0 0 0> + + , <&key_physical_attrs 100 100 0 236 0 0 0> + , <&key_physical_attrs 100 100 100 236 0 0 0> + , <&key_physical_attrs 100 100 200 211 0 0 0> + , <&key_physical_attrs 100 100 300 198 0 0 0> + , <&key_physical_attrs 100 100 400 211 0 0 0> + , <&key_physical_attrs 100 100 500 211 0 0 0> + , <&key_physical_attrs 100 100 900 211 0 0 0> + , <&key_physical_attrs 100 100 1000 211 0 0 0> + , <&key_physical_attrs 100 100 1100 198 0 0 0> + , <&key_physical_attrs 100 100 1200 211 0 0 0> + , <&key_physical_attrs 100 100 1300 236 0 0 0> + , <&key_physical_attrs 100 100 1400 236 0 0 0> + + , <&key_physical_attrs 100 100 348 313 0 0 0> + , <&key_physical_attrs 100 100 348 313 15 398 788> + , <&key_physical_attrs 100 100 348 318 30 398 788> + , <&key_physical_attrs 100 100 1052 318 -30 1102 788> + , <&key_physical_attrs 100 100 1052 313 -15 1102 788> + ; + }; +}; \ No newline at end of file diff --git a/config/charybdis.conf b/config/charybdis.conf index 21769371..230f4c7d 100644 --- a/config/charybdis.conf +++ b/config/charybdis.conf @@ -31,10 +31,10 @@ CONFIG_INPUT=y ## https://zmk.dev/docs/keymaps/behaviors/macros#behavior-queue-limit CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512 -# ## ZMK Studio -# ## https://zmk.dev/docs/features/studio -# CONFIG_ZMK_STUDIO=y -# ## https://zmk.dev/docs/config/studio -# CONFIG_ZMK_STUDIO_LOCKING=y -# CONFIG_ZMK_STUDIO_LOCK_ON_DISCONNECT=y -# CONFIG_ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY=5 +## ZMK Studio +## https://zmk.dev/docs/features/studio +CONFIG_ZMK_STUDIO=y +## https://zmk.dev/docs/config/studio +CONFIG_ZMK_STUDIO_LOCKING=y +CONFIG_ZMK_STUDIO_LOCK_ON_DISCONNECT=y +CONFIG_ZMK_STUDIO_TRANSPORT_BLE_PREF_LATENCY=5 diff --git a/config/charybdis.keymap b/config/charybdis.keymap index 65983281..a25945d5 100644 --- a/config/charybdis.keymap +++ b/config/charybdis.keymap @@ -131,12 +131,12 @@ MiddleClick { bindings = <&mkp MCLK>; - key-positions = <28 38>; + key-positions = <28 37>; }; RightClick { bindings = <&mkp RCLK>; - key-positions = <16 38>; + key-positions = <16 37>; }; BASE_or_EXTRAS { @@ -176,7 +176,7 @@ // ├────────────────┼──────────────┼─────────────────────────┼─────────────────────────────┼──────────────────┼──────────────────┤ ├──────────────────┼─────────────────┼──────────────────────────────────┼──────────────────────────────┼────────────────────────┼──────────────┤ &kp C_AC_SEARCH &kp Z &hm LC(LA(LEFT_SHIFT)) X &hm LA(LC(LG(LEFT_SHIFT))) C &kp V &kp B &kp N &kp M &hm LA(LC(LG(LEFT_SHIFT))) COMMA &hm LC(LA(LEFT_SHIFT)) PERIOD &kp FSLH &kp F12 // ╰────────────────┴──────────────┴─────────────────────────┼─────────────────────────────┼──────────────────┼──────────────────┤ ├──────────────────┼─────────────────┼──────────────────────────────────┴──────────────────────────────┴────────────────────────┴──────────────╯ - &td_cursor < 1 BACKSPACE &mkp LCLK < 7 RETURN < 3 SPACE + &td_cursor &mkp LCLK < 1 BACKSPACE < 7 RETURN < 3 SPACE // ╰─────────────┴──────────────────┴──────────────────╯ ╰──────────────────┴──────────────╯ >; };