From 791f8d1d14dd5fc1ad7595b3bf62e303faa0610f Mon Sep 17 00:00:00 2001 From: Mikael Manukyan Date: Mon, 16 Sep 2024 16:22:12 -0700 Subject: [PATCH] add studio support --- .../shields/hillside_view/hillside_view.conf | 2 +- .../shields/hillside_view/hillside_view.dtsi | 12 +- .../hillside_view/hillside_view_left.conf | 4 +- .../hillside_view/hillside_view_right.conf | 3 - .../boards/shields/hillside_view/layouts.dtsi | 131 ++++++++++++++++++ config/hillside_view.conf | 5 + config/hillside_view.keymap | 3 +- config/hillside_view_left.conf | 1 - config/hillside_view_right.conf | 1 - config/west.yml | 2 +- 10 files changed, 152 insertions(+), 12 deletions(-) create mode 100644 config/boards/shields/hillside_view/layouts.dtsi diff --git a/config/boards/shields/hillside_view/hillside_view.conf b/config/boards/shields/hillside_view/hillside_view.conf index 01f8d91..a661aec 100644 --- a/config/boards/shields/hillside_view/hillside_view.conf +++ b/config/boards/shields/hillside_view/hillside_view.conf @@ -24,4 +24,4 @@ CONFIG_I2C=y CONFIG_PINNACLE=y CONFIG_NFCT_PINS_AS_GPIOS=y CONFIG_INPUT=y -CONFIG_INPUT_PINNACLE=y + diff --git a/config/boards/shields/hillside_view/hillside_view.dtsi b/config/boards/shields/hillside_view/hillside_view.dtsi index 4278e4e..c9183de 100644 --- a/config/boards/shields/hillside_view/hillside_view.dtsi +++ b/config/boards/shields/hillside_view/hillside_view.dtsi @@ -6,11 +6,20 @@ #include #include +#include "layouts.dtsi" + +&hsv_6col_layout { + transform = <&default_transform>; +}; + +&hsv_5col_layout { + transform = <&five_column_transform>; +}; / { chosen: chosen { zmk,kscan = &kscan0; - zmk,matrix_transform = &default_transform; + zmk,physical-layout = &hsv_6col_layout; zmk,underglow = &led_strip; }; @@ -30,6 +39,7 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(3,5) RC(3,6) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,7) RC(3,8) RC(3,9) RC(3,10) >; + }; five_column_transform: keymap_transform_1 { diff --git a/config/boards/shields/hillside_view/hillside_view_left.conf b/config/boards/shields/hillside_view/hillside_view_left.conf index 778e455..263a961 100644 --- a/config/boards/shields/hillside_view/hillside_view_left.conf +++ b/config/boards/shields/hillside_view/hillside_view_left.conf @@ -9,6 +9,4 @@ CONFIG_GPIO=y CONFIG_I2C=y CONFIG_PINCTRL=y -CONFIG_INPUT_PINNACLE=y - -CONFIG_ZMK_USB_LOGGING=y +# CONFIG_INPUT_PINNACLE=y diff --git a/config/boards/shields/hillside_view/hillside_view_right.conf b/config/boards/shields/hillside_view/hillside_view_right.conf index bda1f03..5dd7e8c 100644 --- a/config/boards/shields/hillside_view/hillside_view_right.conf +++ b/config/boards/shields/hillside_view/hillside_view_right.conf @@ -6,9 +6,6 @@ CONFIG_GPIO=y CONFIG_I2C=y CONFIG_PINCTRL=y -CONFIG_INPUT_PINNACLE=y - -# CONFIG_ZMK_USB_LOGGING=y ### Low latency Bluetooth for point devoce ### diff --git a/config/boards/shields/hillside_view/layouts.dtsi b/config/boards/shields/hillside_view/layouts.dtsi new file mode 100644 index 0000000..b78df89 --- /dev/null +++ b/config/boards/shields/hillside_view/layouts.dtsi @@ -0,0 +1,131 @@ +#include + +/ { + hsv_6col_layout: hsv_6col_layout { + compatible = "zmk,physical-layout"; + display-name = "Six Columns"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 55 (-1000) 100 15> + , <&key_physical_attrs 100 100 100 55 (-1000) 100 15> + , <&key_physical_attrs 100 100 229 27 (-500) 0 15> + , <&key_physical_attrs 100 100 360 0 0 0 0> + , <&key_physical_attrs 100 100 459 27 0 0 0> + , <&key_physical_attrs 100 100 560 40 0 0 0> + , <&key_physical_attrs 100 100 1100 40 0 0 0> + , <&key_physical_attrs 100 100 1200 27 0 0 0> + , <&key_physical_attrs 100 100 1300 0 0 0 0> + , <&key_physical_attrs 100 100 1430 27 500 0 15> + , <&key_physical_attrs 100 100 1560 55 1000 1560 15> + , <&key_physical_attrs 100 100 1660 55 1000 1760 15> + , <&key_physical_attrs 100 100 0 152 (-1000) 100 15> + , <&key_physical_attrs 100 100 100 152 (-1000) 100 15> + , <&key_physical_attrs 100 100 229 127 (-500) 0 15> + , <&key_physical_attrs 100 100 360 100 0 0 0> + , <&key_physical_attrs 100 100 459 127 0 0 0> + , <&key_physical_attrs 100 100 560 140 0 0 0> + , <&key_physical_attrs 100 100 1100 140 0 0 0> + , <&key_physical_attrs 100 100 1200 127 0 0 0> + , <&key_physical_attrs 100 100 1300 100 0 0 0> + , <&key_physical_attrs 100 100 1430 127 500 0 15> + , <&key_physical_attrs 100 100 1560 152 1000 1560 15> + , <&key_physical_attrs 100 100 1660 152 1000 1760 15> + , <&key_physical_attrs 100 100 0 252 (-1000) 100 15> + , <&key_physical_attrs 100 100 100 252 (-1000) 0 15> + , <&key_physical_attrs 100 100 229 227 (-500) 0 15> + , <&key_physical_attrs 100 100 360 200 0 0 0> + , <&key_physical_attrs 100 100 459 227 0 0 0> + , <&key_physical_attrs 100 100 560 240 0 0 0> + , <&key_physical_attrs 100 100 1100 240 0 0 0> + , <&key_physical_attrs 100 100 1200 227 0 0 0> + , <&key_physical_attrs 100 100 1300 200 0 0 0> + , <&key_physical_attrs 100 100 1430 227 500 0 15> + , <&key_physical_attrs 100 100 1560 252 1000 0 15> + , <&key_physical_attrs 100 100 1660 252 1000 1760 15> + , <&key_physical_attrs 100 100 400 225 3000 440 805> + , <&key_physical_attrs 100 100 1260 225 (-3000) 1300 805> + , <&key_physical_attrs 100 100 400 327 0 0 0> + , <&key_physical_attrs 100 100 400 327 1500 440 805> + , <&key_physical_attrs 100 100 400 327 3000 440 805> + , <&key_physical_attrs 100 100 400 327 4500 440 805> + , <&key_physical_attrs 100 100 1260 327 (-4500) 1300 805> + , <&key_physical_attrs 100 100 1260 327 (-3000) 1300 805> + , <&key_physical_attrs 100 100 1260 327 (-1500) 1300 805> + , <&key_physical_attrs 100 100 1260 327 0 0 0> + ; + }; + + hsv_5col_layout: hsv_5col_layout { + compatible = "zmk,physical-layout"; + display-name = "Five Column"; + + keys // w h x y rot rx ry + = <&key_physical_attrs 100 100 0 55 (-1000) 0 15> + , <&key_physical_attrs 100 100 129 27 (-500) 0 15> + , <&key_physical_attrs 100 100 260 0 0 0 0> + , <&key_physical_attrs 100 100 359 27 0 0 0> + , <&key_physical_attrs 100 100 459 40 0 0 0> + , <&key_physical_attrs 100 100 1000 40 0 0 0> + , <&key_physical_attrs 100 100 1100 27 0 0 0> + , <&key_physical_attrs 100 100 1200 0 0 0 0> + , <&key_physical_attrs 100 100 1330 27 500 0 15> + , <&key_physical_attrs 100 100 1460 55 1000 1460 15> + , <&key_physical_attrs 100 100 0 152 (-1000) 0 15> + , <&key_physical_attrs 100 100 129 127 (-500) 0 15> + , <&key_physical_attrs 100 100 260 100 0 0 0> + , <&key_physical_attrs 100 100 359 127 0 0 0> + , <&key_physical_attrs 100 100 459 140 0 0 0> + , <&key_physical_attrs 100 100 1000 140 0 0 0> + , <&key_physical_attrs 100 100 1100 127 0 0 0> + , <&key_physical_attrs 100 100 1200 100 0 0 0> + , <&key_physical_attrs 100 100 1330 127 500 0 15> + , <&key_physical_attrs 100 100 1460 152 1000 1460 15> + , <&key_physical_attrs 100 100 0 252 (-1000) 0 15> + , <&key_physical_attrs 100 100 129 227 (-500) 0 15> + , <&key_physical_attrs 100 100 260 200 0 0 0> + , <&key_physical_attrs 100 100 359 227 0 0 0> + , <&key_physical_attrs 100 100 459 240 0 0 0> + , <&key_physical_attrs 100 100 1000 240 0 0 0> + , <&key_physical_attrs 100 100 1100 227 0 0 0> + , <&key_physical_attrs 100 100 1200 200 0 0 0> + , <&key_physical_attrs 100 100 1330 227 500 0 15> + , <&key_physical_attrs 100 100 1460 252 1000 0 15> + , <&key_physical_attrs 100 100 300 225 3000 340 805> + , <&key_physical_attrs 100 100 1160 225 (-3000) 1200 805> + , <&key_physical_attrs 100 100 300 327 0 0 0> + , <&key_physical_attrs 100 100 300 327 1500 340 805> + , <&key_physical_attrs 100 100 300 327 3000 340 805> + , <&key_physical_attrs 100 100 300 327 4500 340 805> + , <&key_physical_attrs 100 100 1160 327 (-4500) 1200 805> + , <&key_physical_attrs 100 100 1160 327 (-3000) 1200 805> + , <&key_physical_attrs 100 100 1160 327 (-1500) 1200 805> + , <&key_physical_attrs 100 100 1160 327 0 0 0> + ; + }; + + hsv_position_map { + compatible = "zmk,physical-layout-position-map"; + + complete; + + twelve { + physical-layout = <&hsv_6col_layout>; + positions + = < 0 1 2 3 4 5 6 7 8 9 10 11> + , <12 13 14 15 16 17 18 19 20 21 22 23> + , <24 25 26 27 28 29 30 31 32 33 34 35> + , < 36 37 > + , < 38 39 40 41 42 43 44 45 >; + }; + + ten { + physical-layout = <&hsv_5col_layout>; + positions + = <40 0 1 2 3 4 5 6 7 8 9 41> + , <42 10 11 12 13 14 15 16 17 18 19 43> + , <44 20 21 22 23 24 25 26 27 28 29 45> + , < 30 31 > + , < 32 33 34 35 36 37 38 39 >; + }; + }; +}; diff --git a/config/hillside_view.conf b/config/hillside_view.conf index f2a10e6..aa674e6 100644 --- a/config/hillside_view.conf +++ b/config/hillside_view.conf @@ -1,3 +1,5 @@ +CONFIG_ZMK_KEYBOARD_NAME="Mikael HSV" + # CONFIG_EC11=y # CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y @@ -19,3 +21,6 @@ CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y # report peripheral battery level CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_PROXY=y + +CONFIG_ZMK_STUDIO=y +CONFIG_ZMK_STUDIO_RPC_THREAD_STACK_SIZE=8120 diff --git a/config/hillside_view.keymap b/config/hillside_view.keymap index 9c93c43..5c5d06f 100644 --- a/config/hillside_view.keymap +++ b/config/hillside_view.keymap @@ -7,6 +7,7 @@ #include #include +#include // Left bottom row pinky 2nd column @@ -275,7 +276,7 @@ display-name = "ADJUST"; bindings = < &bootloader &rgb_ug RGB_TOG &rgb_ug RGB_HUI &rgb_ug RGB_SAI &rgb_ug RGB_BRI &rgb_ug RGB_SPI &out OUT_TOG &trans &trans &trans &trans &bootloader -&sys_reset &rgb_ug RGB_EFF &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &trans &trans &trans &trans &trans &sys_reset +&sys_reset &rgb_ug RGB_EFF &rgb_ug RGB_HUD &rgb_ug RGB_SAD &rgb_ug RGB_BRD &rgb_ug RGB_SPD &studio_unlock &trans &trans &trans &trans &sys_reset &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp C_PREV &kp C_PP &kp C_NEXT &kp C_VOL_UP &kp C_MUTE &kp C_VOL_DN &trans &trans &ext_power EP_TOG &to WIN &trans &trans &trans &trans &to DEF &trans diff --git a/config/hillside_view_left.conf b/config/hillside_view_left.conf index a0432fc..e69de29 100644 --- a/config/hillside_view_left.conf +++ b/config/hillside_view_left.conf @@ -1 +0,0 @@ -CONFIG_ZMK_KEYBOARD_NAME="Mikael HSV/L" diff --git a/config/hillside_view_right.conf b/config/hillside_view_right.conf index 690e5e8..e69de29 100644 --- a/config/hillside_view_right.conf +++ b/config/hillside_view_right.conf @@ -1 +0,0 @@ -CONFIG_ZMK_KEYBOARD_NAME="Mikael HSV/R" diff --git a/config/west.yml b/config/west.yml index d093e3f..88f836b 100644 --- a/config/west.yml +++ b/config/west.yml @@ -11,7 +11,7 @@ manifest: # import: app/west.yml - name: zmk remote: badjeff - revision: feat/pointers-move-scroll + revision: feat/pointers-move-scroll-studio import: app/west.yml - name: zmk-adns9800-driver remote: badjeff