Skip to content

Commit

Permalink
studio support
Browse files Browse the repository at this point in the history
  • Loading branch information
tokyo2006 committed Dec 3, 2024
1 parent 4dc56f9 commit 1baf3e8
Show file tree
Hide file tree
Showing 7 changed files with 92 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ include:
- board: corne_left
shield: nice_view_adapter nice_view
artifact-name: corne_left_nice_view
snippet: studio-rpc-usb-uart
- board: corne_right
shield: nice_view_adapter nice_view
artifact-name: corne_right_nice_view
4 changes: 4 additions & 0 deletions config/boards/arm/corne/corne.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,8 @@ CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=n
# Uncomment the following line to increase the keyboard's wireless range
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y

# ZMK STUDIO
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n


12 changes: 11 additions & 1 deletion config/boards/arm/corne/corne.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#include <nordic/nrf52840_qiaa.dtsi>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/matrix_transform.h>
#include "corne_layouts.dtsi"

&corne_layout {
transform = <&default_transform>;
};

/ {
model = "corne";
Expand All @@ -22,7 +27,7 @@
zephyr,display = &oled;
zephyr,console = &cdc_acm_uart;
zmk,underglow = &led_strip;
zmk,matrix-transform = &default_transform;
/*zmk,matrix-transform = &default_transform;*/
zmk,backlight = &backlight;
};

Expand Down Expand Up @@ -203,3 +208,8 @@
pinctrl-1 = <&pwm0_sleep>;
pinctrl-names = "default", "sleep";
};

zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";
};
65 changes: 65 additions & 0 deletions config/boards/arm/corne/corne_layouts.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#include <physical_layouts.dtsi>

/ {
chosen {
zmk,physical-layout = &corne_layout;
};
corne_layout: corne_layout {
compatible = "zmk,physical-layout";
display-name = "default_layout";

kscan = <&kscan0>;
transform = <&matrix_transform0>;

keys // w h x y rot rx ry
= <&key_physical_attrs 100 100 0 88 0 0 0>
, <&key_physical_attrs 100 100 100 88 0 0 0>
, <&key_physical_attrs 100 100 200 50 0 0 0>
, <&key_physical_attrs 100 100 300 38 0 0 0>
, <&key_physical_attrs 100 100 400 50 0 0 0>
, <&key_physical_attrs 100 100 500 75 0 0 0>
, <&key_physical_attrs 100 100 775 0 0 0 0>
, <&key_physical_attrs 100 100 1050 75 0 0 0>
, <&key_physical_attrs 100 100 1150 50 0 0 0>
, <&key_physical_attrs 100 100 1250 38 0 0 0>
, <&key_physical_attrs 100 100 1350 50 0 0 0>
, <&key_physical_attrs 100 100 1450 88 0 0 0>
, <&key_physical_attrs 100 100 1550 88 0 0 0>
, <&key_physical_attrs 100 100 0 188 0 0 0>
, <&key_physical_attrs 100 100 100 188 0 0 0>
, <&key_physical_attrs 100 100 200 150 0 0 0>
, <&key_physical_attrs 100 100 300 138 0 0 0>
, <&key_physical_attrs 100 100 400 150 0 0 0>
, <&key_physical_attrs 100 100 500 175 0 0 0>
, <&key_physical_attrs 100 100 775 200 0 0 0>
, <&key_physical_attrs 100 100 1050 175 0 0 0>
, <&key_physical_attrs 100 100 1150 150 0 0 0>
, <&key_physical_attrs 100 100 1250 138 0 0 0>
, <&key_physical_attrs 100 100 1350 150 0 0 0>
, <&key_physical_attrs 100 100 1450 188 0 0 0>
, <&key_physical_attrs 100 100 1550 188 0 0 0>
, <&key_physical_attrs 100 100 0 288 0 0 0>
, <&key_physical_attrs 100 100 100 288 0 0 0>
, <&key_physical_attrs 100 100 200 250 0 0 0>
, <&key_physical_attrs 100 100 300 238 0 0 0>
, <&key_physical_attrs 100 100 400 250 0 0 0>
, <&key_physical_attrs 100 100 500 275 0 0 0>
, <&key_physical_attrs 100 100 675 100 0 0 0>
, <&key_physical_attrs 100 100 1050 275 0 0 0>
, <&key_physical_attrs 100 100 1150 250 0 0 0>
, <&key_physical_attrs 100 100 1250 238 0 0 0>
, <&key_physical_attrs 100 100 1350 250 0 0 0>
, <&key_physical_attrs 100 100 1450 288 0 0 0>
, <&key_physical_attrs 100 100 1550 288 0 0 0>
, <&key_physical_attrs 100 100 650 325 0 0 0>
, <&key_physical_attrs 100 100 400 400 0 0 0>
, <&key_physical_attrs 100 100 550 400 3000 500 400>
, <&key_physical_attrs 100 150 675 350 3000 500 400>
, <&key_physical_attrs 100 100 875 100 0 0 0>
, <&key_physical_attrs 100 150 875 350 (-3000) 1150 400>
, <&key_physical_attrs 100 100 1000 400 (-3000) 1150 400>
, <&key_physical_attrs 100 100 1150 400 0 0 0>
, <&key_physical_attrs 100 100 775 100 0 0 0>
;
};
};
4 changes: 4 additions & 0 deletions config/boards/arm/corne/corne_left_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,7 @@ CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n
#EC11 enable
CONFIG_EC11=y
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# ZMK STUDIO
CONFIG_ZMK_STUDIO=y
CONFIG_ZMK_STUDIO_LOCKING=n
2 changes: 1 addition & 1 deletion config/corne.keymap
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
// | GUI | | SPC | | ENT | | ALT |

bindings = <
&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &mmv MOVE_UP &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&studio_unlock &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &mmv MOVE_UP &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
&trans &bt BT_CLR_ALL &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &mmv MOVE_DOWN &kp LEFT &kp DOWN &kp UP &kp RIGHT &kp HOME &kp PG_UP
&trans &rgb_ug RGB_OFF &rgb_ug RGB_ON &trans &trans &rgb_ug RGB_EFF &mmv MOVE_LEFT &rgb_ug RGB_EFR &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_BRD &kp END &kp PG_DN
&kp C_MUTE &trans &trans &trans &mmv MOVE_RIGHT &kp INS &kp DEL &trans
Expand Down
11 changes: 6 additions & 5 deletions config/west.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
manifest:
remotes:
- name: urob
url-base: https://github.com/urob
- name: zmkfirmware
url-base: https://github.com/petejohanson
- name: gpeye
url-base: https://github.com/GPeye
projects:
- name: zmk
remote: urob
revision: main
remote: zmkfirmware
revision: feat/pointers-with-input-processors
import: app/west.yml
self:
path: config

0 comments on commit 1baf3e8

Please sign in to comment.