Skip to content

Commit

Permalink
initial commit for zmk studio integration
Browse files Browse the repository at this point in the history
  • Loading branch information
280Zo committed Nov 6, 2024
1 parent d9f3a6a commit 3efec7d
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 15 deletions.
2 changes: 1 addition & 1 deletion boards/shields/charybdis-bt/charybdis.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <dt-bindings/zmk/matrix_transform.h>

#include "charybdis-layouts.dtsi"
/ {
chosen {
zmk,kscan = &kscan0;
Expand Down
8 changes: 4 additions & 4 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
56 changes: 56 additions & 0 deletions config/charybdis-layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#include <physical_layouts.dtsi>

/ {
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>
;
};
};
14 changes: 7 additions & 7 deletions config/charybdis.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions config/charybdis.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 &lt 1 BACKSPACE &mkp LCLK &lt 7 RETURN &lt 3 SPACE
&td_cursor &mkp LCLK &lt 1 BACKSPACE &lt 7 RETURN &lt 3 SPACE
// ╰─────────────┴──────────────────┴──────────────────╯ ╰──────────────────┴──────────────╯
>;
};
Expand Down

0 comments on commit 3efec7d

Please sign in to comment.