Skip to content

Commit

Permalink
ZMK_STUDIO
Browse files Browse the repository at this point in the history
  • Loading branch information
441953309 committed Dec 1, 2024
1 parent cdc6a03 commit 8f72c38
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 21 deletions.
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include:
- board: nice_nano_v2
shield: gamebox58_left
snippet: studio-rpc-usb-uart
- board: nice_nano_v2
shield: gamebox58_right
- board: nice_nano_v2
Expand Down
90 changes: 75 additions & 15 deletions config/boards/shields/gamebox58/gamebox58.dtsi
Original file line number Diff line number Diff line change
@@ -1,9 +1,81 @@
#include <dt-bindings/zmk/matrix_transform.h>
#include <physical_layouts.dtsi>

/ {
chosen {
zmk,kscan = &kscan0;
zmk,matrix_transform = &default_transform;
zmk,physical-layout = &default_layout;
};

default_layout: default_layout {
compatible = "zmk,physical-layout";
display-name = "Default Layout";
transform = <&default_transform>;
kscan = <&kscan0>;
keys // w h x y rot rx ry
= <&key_physical_attrs 100 100 0 0 0 0 0>
, <&key_physical_attrs 100 100 100 0 0 0 0>
, <&key_physical_attrs 100 100 200 0 0 0 0>
, <&key_physical_attrs 100 100 300 0 0 0 0>
, <&key_physical_attrs 100 100 400 0 0 0 0>
, <&key_physical_attrs 100 100 500 0 0 0 0>
, <&key_physical_attrs 100 100 700 0 0 0 0>
, <&key_physical_attrs 100 100 800 0 0 0 0>
, <&key_physical_attrs 100 100 900 0 0 0 0>
, <&key_physical_attrs 100 100 1000 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 100 100 0 100 0 0 0>
, <&key_physical_attrs 100 100 100 100 0 0 0>
, <&key_physical_attrs 100 100 200 100 0 0 0>
, <&key_physical_attrs 100 100 300 100 0 0 0>
, <&key_physical_attrs 100 100 400 100 0 0 0>
, <&key_physical_attrs 100 100 500 100 0 0 0>
, <&key_physical_attrs 100 100 700 100 0 0 0>
, <&key_physical_attrs 100 100 800 100 0 0 0>
, <&key_physical_attrs 100 100 900 100 0 0 0>
, <&key_physical_attrs 100 100 1000 100 0 0 0>
, <&key_physical_attrs 100 100 1100 100 0 0 0>
, <&key_physical_attrs 100 100 1200 100 0 0 0>

, <&key_physical_attrs 100 100 0 200 0 0 0>
, <&key_physical_attrs 100 100 100 200 0 0 0>
, <&key_physical_attrs 100 100 200 200 0 0 0>
, <&key_physical_attrs 100 100 300 200 0 0 0>
, <&key_physical_attrs 100 100 400 200 0 0 0>
, <&key_physical_attrs 100 100 500 200 0 0 0>
, <&key_physical_attrs 100 100 700 200 0 0 0>
, <&key_physical_attrs 100 100 800 200 0 0 0>
, <&key_physical_attrs 100 100 900 200 0 0 0>
, <&key_physical_attrs 100 100 1000 200 0 0 0>
, <&key_physical_attrs 100 100 1100 200 0 0 0>
, <&key_physical_attrs 100 100 1200 200 0 0 0>

, <&key_physical_attrs 100 100 0 300 0 0 0>
, <&key_physical_attrs 100 100 100 300 0 0 0>
, <&key_physical_attrs 100 100 200 300 0 0 0>
, <&key_physical_attrs 100 100 300 300 0 0 0>
, <&key_physical_attrs 100 100 400 300 0 0 0>
, <&key_physical_attrs 100 100 500 300 0 0 0>
, <&key_physical_attrs 100 100 700 300 0 0 0>
, <&key_physical_attrs 100 100 800 300 0 0 0>
, <&key_physical_attrs 100 100 900 300 0 0 0>
, <&key_physical_attrs 100 100 1000 300 0 0 0>
, <&key_physical_attrs 100 100 1100 300 0 0 0>
, <&key_physical_attrs 100 100 1200 300 0 0 0>

, <&key_physical_attrs 100 100 0 400 0 0 0>
, <&key_physical_attrs 100 100 100 400 0 0 0>
, <&key_physical_attrs 100 100 200 400 0 0 0>
, <&key_physical_attrs 100 100 300 400 0 0 0>
, <&key_physical_attrs 200 100 400 400 0 0 0>

, <&key_physical_attrs 200 100 700 400 0 0 0>
, <&key_physical_attrs 100 100 900 400 0 0 0>
, <&key_physical_attrs 100 100 1000 400 0 0 0>
, <&key_physical_attrs 100 100 1100 400 0 0 0>
, <&key_physical_attrs 100 100 1200 400 0 0 0>
;
};

default_transform: keymap_transform_0 {
Expand All @@ -21,27 +93,15 @@

kscan0: kscan {
compatible = "zmk,kscan-gpio-matrix";
label = "KSCAN";
diode-direction = "col2row";
wakeup-source;

row-gpios
= <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
, <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
;
col-gpios
= <&pro_micro 5 GPIO_ACTIVE_HIGH>
, <&pro_micro 6 GPIO_ACTIVE_HIGH>
, <&pro_micro 7 GPIO_ACTIVE_HIGH>
, <&pro_micro 8 GPIO_ACTIVE_HIGH>
, <&pro_micro 9 GPIO_ACTIVE_HIGH>
, <&pro_micro 10 GPIO_ACTIVE_HIGH>
, <&pro_micro 16 GPIO_ACTIVE_HIGH>
, <&pro_micro 14 GPIO_ACTIVE_HIGH>
, <&pro_micro 15 GPIO_ACTIVE_HIGH>
, <&pro_micro 18 GPIO_ACTIVE_HIGH>
;
};
};
10 changes: 5 additions & 5 deletions config/gamebox58.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ CONFIG_WS2812_STRIP=y
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y

CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=30

# Use the STRIP config specific to the LEDs you're using






CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n
12 changes: 11 additions & 1 deletion config/gamebox58.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@
&none &none &none &none &none &none &none &none &none &none &none &kp F12
&none &none &none &none &none &none &none &none &none &none &none &none
&kp LSHFT &none &none &none &none &none &none &none &none &none &none &kp RSHFT
&kp LCTRL &none &kp LGUI &kp LALT &kp SPACE &kp RET &kp RALT &kp RGUI &mo 1 &kp RCTRL
&kp LCTRL &none &mo 2 &kp LALT &kp SPACE &kp RET &kp RALT &kp RGUI &mo 1 &kp RCTRL
>;
};

L2_layer {
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &bt BT_CLR &none &none &bootloader &sys_reset &none &none &none &none &none &none
&none &rgb_ug RGB_TOG &none &none &none &out OUT_TOG &none &none &none &none &none &none
&kp LSHFT &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &none &none &none &none &kp RSHFT
&kp LCTRL &none &mo 2 &kp LALT &kp SPACE &kp RET &kp RALT &kp RGUI &none &kp RCTRL
>;
};
};
Expand Down

0 comments on commit 8f72c38

Please sign in to comment.