From cd162ea823a9c422df881e66bebefe0669087442 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:10:14 -0500 Subject: [PATCH 01/21] feat: uf2 support for west flash --- config/boards/arm/corne/board.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/boards/arm/corne/board.cmake b/config/boards/arm/corne/board.cmake index ccc9c43d2..8bb74967c 100644 --- a/config/boards/arm/corne/board.cmake +++ b/config/boards/arm/corne/board.cmake @@ -1,6 +1,8 @@ -# Copyright (c) 2021 @MangoIV +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") + +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) From ff0acc10004232102201345511567e66841a1764 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:08:04 -0500 Subject: [PATCH 02/21] refactor: remove unused files --- config/Kconfig | 10 ---------- config/boards/arm/corne/corne.conf | 32 ------------------------------ 2 files changed, 42 deletions(-) delete mode 100644 config/Kconfig delete mode 100644 config/boards/arm/corne/corne.conf diff --git a/config/Kconfig b/config/Kconfig deleted file mode 100644 index 11f09ea51..000000000 --- a/config/Kconfig +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) 2022 The ZMK Contributors -# SPDX-License-Identifier: MIT -# - -config BOARD_CORNE_LEFT - bool - -config BOARD_CORNE_RIGHT - bool diff --git a/config/boards/arm/corne/corne.conf b/config/boards/arm/corne/corne.conf deleted file mode 100644 index 16f3422e4..000000000 --- a/config/boards/arm/corne/corne.conf +++ /dev/null @@ -1,32 +0,0 @@ -# go to sleep after one hour (1*60*60*1000ms) -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 - -# Turn on logging, and set ZMK logging to debug output -# CONFIG_ZMK_USB_LOGGING=n -# -# Copyright (c) 2022 Darryl deHaan -# SPDX-License-Identifier: MIT -# - -CONFIG_ZMK_SLEEP=y -CONFIG_WS2812_STRIP=y -CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y -CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n -CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=90 - -CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y -CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=y -CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 -CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 - -#CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y -CONFIG_ZMK_BACKLIGHT=y -CONFIG_ZMK_BACKLIGHT_BRT_START=100 -CONFIG_ZMK_BACKLIGHT_ON_START=y -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 - - From c49abff17e5f6f9457d88afcbbc181ae7a1ffdee Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 13:51:28 -0500 Subject: [PATCH 03/21] refactor: return to zmkfirmware main --- config/corne.conf | 4 +-- config/corne.keymap | 64 +++++++++++---------------------------------- config/west.yml | 11 +++++--- 3 files changed, 24 insertions(+), 55 deletions(-) diff --git a/config/corne.conf b/config/corne.conf index e6b8df14d..84b5d4f72 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Darryl deHaan +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT # @@ -24,7 +24,7 @@ CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y #EXT POWER CONFIG_ZMK_EXT_POWER=y -# MOUSE +# Mouse clicks CONFIG_ZMK_MOUSE=y CONFIG_BT_CTLR_TX_PWR_PLUS_8=y diff --git a/config/corne.keymap b/config/corne.keymap index e7b6bdff7..079cb6b1c 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -1,4 +1,3 @@ -#include #include #include #include @@ -6,50 +5,21 @@ #include #include -#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1200 // 600 -#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10 -#define U_MS_U &mmv MOVE_UP -#define U_MS_D &mmv MOVE_DOWN -#define U_MS_L &mmv MOVE_LEFT -#define U_MS_R &mmv MOVE_RIGHT - / { behaviors { td0: td0 { compatible = "zmk,behavior-tap-dance"; - label = "TD0"; #binding-cells = <0>; bindings = <&kp LEFT_SHIFT>, <&kp CAPS>; }; - - mmv { - acceleration-exponent = <1>; // 1 - time-to-max-speed-ms = <900>; // 40 - delay-ms = <0>; // 0 - }; - - msc { - acceleration-exponent = <1>; // 0 - time-to-max-speed-ms = <400>; // 500 - delay-ms = <0>; // 10 - }; }; rgb_encoder: rgb_encoder { compatible = "zmk,behavior-sensor-rotate"; - label = "RGB_ENCODER"; #sensor-binding-cells = <0>; bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; }; - scroll_encoder: scroll_encoder { - compatible = "zmk,behavior-sensor-rotate"; - #sensor-binding-cells = <0>; - bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>; - - tap-ms = <30>; - }; - keymap { compatible = "zmk,keymap"; @@ -71,7 +41,6 @@ &kp ENTER >; - label = "QWERTY"; sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; }; @@ -85,15 +54,14 @@ // | 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 -&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 +&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &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 &trans &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 &trans &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 &trans &kp INS &kp DEL &trans &mkp LCLK >; - label = "NUMBER"; - sensor-bindings = <&scroll_encoder>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; }; raise_layer { @@ -106,29 +74,27 @@ // | GUI | | SPC | | ENT | | ALT | bindings = < -&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &mmv MOVE_UP &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC -&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &mmv MOVE_DOWN &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE -&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &mmv MOVE_LEFT &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &trans &trans &trans &kp SPACE &mmv MOVE_RIGHT &kp RET &trans &trans +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &trans &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC +&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE +&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &trans &trans &trans &kp SPACE &trans &kp RET &trans &trans &mkp LCLK >; - label = "SYMBOL"; - sensor-bindings = <&scroll_encoder>; + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; }; layer_3 { display-name = "Fn"; bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &mmv MOVE_UP &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &mmv MOVE_DOWN &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 -&trans &sys_reset &trans &bootloader &trans &mkp MB5 &mmv MOVE_LEFT &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK - &kp C_MUTE &trans &trans &trans &mmv MOVE_RIGHT &trans &trans &trans +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 +&trans &sys_reset &trans &bootloader &trans &mkp MB5 &trans &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK + &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &mkp LCLK >; - label = "FN"; - sensor-bindings = <&scroll_encoder>; + sensor-bindings = <&rgb_encoder>; }; }; }; diff --git a/config/west.yml b/config/west.yml index 440a85c8f..d658e2390 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,12 +1,15 @@ manifest: remotes: - - name: urob - url-base: https://github.com/urob + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + # Additional modules containing boards/shields/custom code can be listed here as well. + # See: + # - https://zmk.dev/docs/features/modules + # - https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects projects: - name: zmk - remote: urob + remote: zmkfirmware revision: main import: app/west.yml self: path: config - From 96b95ad919e970405f1c7feab2ec2e66b29394e1 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:16:27 -0500 Subject: [PATCH 04/21] refactor: display configuration This keyboard is not offered with an I2C OLED, so no need to configure one just to immediately convert it to an SPI MIP display. --- build.yaml | 12 ++--- config/boards/arm/corne/Kconfig.defconfig | 38 ++------------- config/boards/arm/corne/corne.dtsi | 47 +++++++------------ config/boards/arm/corne/corne.yaml | 4 +- config/boards/arm/corne/corne_left_defconfig | 20 +------- config/boards/arm/corne/corne_right_defconfig | 20 +------- .../nice_view_adapter/Kconfig.defconfig | 0 .../shields/nice_view_adapter/Kconfig.shield | 2 - .../boards/corne_left.overlay | 29 ------------ .../boards/corne_right.overlay | 29 ------------ .../nice_view_adapter/nice_view_adapter.conf | 6 --- .../nice_view_adapter.overlay | 0 .../nice_view_adapter.zmk.yml | 7 --- 13 files changed, 27 insertions(+), 187 deletions(-) delete mode 100644 config/boards/shields/nice_view_adapter/Kconfig.defconfig delete mode 100644 config/boards/shields/nice_view_adapter/Kconfig.shield delete mode 100644 config/boards/shields/nice_view_adapter/boards/corne_left.overlay delete mode 100644 config/boards/shields/nice_view_adapter/boards/corne_right.overlay delete mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.conf delete mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.overlay delete mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml diff --git a/build.yaml b/build.yaml index bb362f71e..e79cfc616 100644 --- a/build.yaml +++ b/build.yaml @@ -1,10 +1,8 @@ +--- include: - - - board: nice_nano_v2 - shield: settings_reset - board: corne_left - shield: nice_view_adapter nice_view - artifact-name: corne_left_nice_view + shield: nice_view - board: corne_right - shield: nice_view_adapter nice_view - artifact-name: corne_right_nice_view + shield: nice_view + - board: corne_left + shield: settings_reset diff --git a/config/boards/arm/corne/Kconfig.defconfig b/config/boards/arm/corne/Kconfig.defconfig index 55a36f2d9..f4f509220 100644 --- a/config/boards/arm/corne/Kconfig.defconfig +++ b/config/boards/arm/corne/Kconfig.defconfig @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Darryl deHaan +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT # @@ -13,7 +13,6 @@ config ZMK_SPLIT_ROLE_CENTRAL endif # BOARD_CORNE_LEFT - if BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT config BOARD @@ -29,7 +28,7 @@ config BOARD_ENABLE_DCDC_HV default y select SOC_DCDC_NRF52X_HV depends on (BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT) - + config ZMK_SPLIT default y @@ -47,38 +46,6 @@ config USB_DEVICE_STACK endif # USB -if ZMK_DISPLAY - -config I2C - default y - -config SSD1306 - default y - -choice ZMK_DISPLAY_WORK_QUEUE - default ZMK_DISPLAY_WORK_QUEUE_DEDICATED -endchoice - -endif - -if SSD1306 - -config LV_Z_VDB_SIZE - default 64 - -config LV_DPI_DEF - default 148 - -config LV_Z_BITS_PER_PIXEL - default 1 - -choice LV_COLOR_DEPTH - default LV_COLOR_DEPTH_1 -endchoice - -endif - -endif # BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT if ZMK_BACKLIGHT config PWM @@ -89,3 +56,4 @@ config LED_PWM endif # ZMK_BACKLIGHT +endif # BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 4f9c48771..96b77d6d7 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -1,6 +1,6 @@ /* * -* Copyright (c) 2021 Darryl deHaan +* Copyright (c) 2024 The ZMK Contributors * SPDX-License-Identifier: MIT * */ @@ -19,7 +19,6 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; - zephyr,display = &oled; zephyr,console = &cdc_acm_uart; zmk,underglow = &led_strip; zmk,matrix-transform = &default_transform; @@ -113,17 +112,19 @@ }; &pinctrl { - i2c0_default: i2c0_default { + spi0_default: spi0_default { group1 { - psels = , - ; + psels = , + , + ; }; }; - i2c0_sleep: i2c0_sleep { + spi0_sleep: spi0_sleep { group1 { - psels = , - ; + psels = , + , + ; low-power-enable; }; }; @@ -142,34 +143,18 @@ }; }; -&i2c0 { - status = "okay"; - - compatible = "nordic,nrf-twi"; - pinctrl-0 = <&i2c0_default>; - pinctrl-1 = <&i2c0_sleep>; - pinctrl-names = "default", "sleep"; - oled: ssd1306@3c { - compatible = "solomon,ssd1306fb"; - reg = <0x3c>; - label = "DISPLAY"; - width = <128>; - height = <32>; - segment-offset = <0>; - page-offset = <0>; - display-offset = <0>; - multiplex-ratio = <31>; - segment-remap; - com-invdir; - com-sequential; - prechargep = <0x22>; - }; +nice_view_spi: &spi0 { + compatible = "nordic,nrf-spim"; + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_sleep>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; &spi3 { - compatible = "nordic,nrf-spim"; status = "okay"; + compatible = "nordic,nrf-spim"; pinctrl-0 = <&spi3_default>; pinctrl-1 = <&spi3_sleep>; pinctrl-names = "default", "sleep"; diff --git a/config/boards/arm/corne/corne.yaml b/config/boards/arm/corne/corne.yaml index a98a8b8ec..65d630062 100644 --- a/config/boards/arm/corne/corne.yaml +++ b/config/boards/arm/corne/corne.yaml @@ -7,7 +7,6 @@ toolchain: - zephyr - gnuarmemb - xtools -ram: 40 supported: - adc - usb_device @@ -16,5 +15,4 @@ supported: - pwm - watchdog - gpio - - i2c - - spi \ No newline at end of file + - spi diff --git a/config/boards/arm/corne/corne_left_defconfig b/config/boards/arm/corne/corne_left_defconfig index 6a37a2a23..30a26b042 100644 --- a/config/boards/arm/corne/corne_left_defconfig +++ b/config/boards/arm/corne/corne_left_defconfig @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Darryl deHaan +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT # @@ -43,24 +43,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y -# enable display drivers -CONFIG_ZMK_DISPLAY=y - - - -#CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y -#CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 -#CONFIG_LV_Z_BITS_PER_PIXEL=1 -#CONFIG_LV_COLOR_DEPTH_1=y -#CONFIG_LV_DPI_DEF=145 -#CONFIG_LV_Z_VDB_SIZE=100 -#CONFIG_LV_USE_THEME_MONO=y -#CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 -#CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y -#CONFIG_LV_FONT_MONTSERRAT_26=y -#CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - - #EXT POWER CONFIG_ZMK_EXT_POWER=y diff --git a/config/boards/arm/corne/corne_right_defconfig b/config/boards/arm/corne/corne_right_defconfig index 51901fa61..dca513bee 100644 --- a/config/boards/arm/corne/corne_right_defconfig +++ b/config/boards/arm/corne/corne_right_defconfig @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Darryl deHaan +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT # @@ -42,24 +42,6 @@ CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y CONFIG_ZMK_USB=n CONFIG_ZMK_BLE=y -# enable display drivers -CONFIG_ZMK_DISPLAY=y - - - - -#CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y -#CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048 -#CONFIG_LV_Z_BITS_PER_PIXEL=1 -#CONFIG_LV_COLOR_DEPTH_1=y -#CONFIG_LV_DPI_DEF=145 -#CONFIG_LV_Z_VDB_SIZE=100 -#CONFIG_LV_USE_THEME_MONO=y -#CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00 -#CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y -#CONFIG_LV_FONT_MONTSERRAT_26=y -#CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - #EXT POWER CONFIG_ZMK_EXT_POWER=y diff --git a/config/boards/shields/nice_view_adapter/Kconfig.defconfig b/config/boards/shields/nice_view_adapter/Kconfig.defconfig deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/boards/shields/nice_view_adapter/Kconfig.shield b/config/boards/shields/nice_view_adapter/Kconfig.shield deleted file mode 100644 index e465bd02b..000000000 --- a/config/boards/shields/nice_view_adapter/Kconfig.shield +++ /dev/null @@ -1,2 +0,0 @@ -config SHIELD_NICE_VIEW_ADAPTER - def_bool $(shields_list_contains,nice_view_adapter) \ No newline at end of file diff --git a/config/boards/shields/nice_view_adapter/boards/corne_left.overlay b/config/boards/shields/nice_view_adapter/boards/corne_left.overlay deleted file mode 100644 index 982bc3215..000000000 --- a/config/boards/shields/nice_view_adapter/boards/corne_left.overlay +++ /dev/null @@ -1,29 +0,0 @@ -&pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; -}; - -nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; -}; - -&i2c0 { - status = "disabled"; -}; \ No newline at end of file diff --git a/config/boards/shields/nice_view_adapter/boards/corne_right.overlay b/config/boards/shields/nice_view_adapter/boards/corne_right.overlay deleted file mode 100644 index 982bc3215..000000000 --- a/config/boards/shields/nice_view_adapter/boards/corne_right.overlay +++ /dev/null @@ -1,29 +0,0 @@ -&pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , - , - ; - low-power-enable; - }; - }; -}; - -nice_view_spi: &spi0 { - compatible = "nordic,nrf-spim"; - pinctrl-0 = <&spi0_default>; - pinctrl-1 = <&spi0_sleep>; - pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; -}; - -&i2c0 { - status = "disabled"; -}; \ No newline at end of file diff --git a/config/boards/shields/nice_view_adapter/nice_view_adapter.conf b/config/boards/shields/nice_view_adapter/nice_view_adapter.conf deleted file mode 100644 index 07872d2e0..000000000 --- a/config/boards/shields/nice_view_adapter/nice_view_adapter.conf +++ /dev/null @@ -1,6 +0,0 @@ -CONFIG_SSD1306=n -# Enable Nice View -#CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -#CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -#CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y \ No newline at end of file diff --git a/config/boards/shields/nice_view_adapter/nice_view_adapter.overlay b/config/boards/shields/nice_view_adapter/nice_view_adapter.overlay deleted file mode 100644 index e69de29bb..000000000 diff --git a/config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml b/config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml deleted file mode 100644 index 3d44235d6..000000000 --- a/config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml +++ /dev/null @@ -1,7 +0,0 @@ -file_format: "1" -id: nice_view_adapter -name: nice!view adapter -type: shield -url: https://nicekeyboards.com/nice-view -requires: [i2c_oled] -exposes: [nice_view_header] \ No newline at end of file From d81edeb62385fb261385157bf48051896b49ae6b Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:35:35 -0500 Subject: [PATCH 05/21] refactor: modernize USB configuration --- build.yaml | 3 +++ config/boards/arm/corne/corne.dtsi | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.yaml b/build.yaml index e79cfc616..fbde14d3c 100644 --- a/build.yaml +++ b/build.yaml @@ -2,7 +2,10 @@ include: - board: corne_left shield: nice_view + #snippet: zmk-usb-logging # Uncomment to log over USB. - board: corne_right shield: nice_view + #snippet: zmk-usb-logging - board: corne_left shield: settings_reset + #snippet: zmk-usb-logging diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 96b77d6d7..aa87bccd4 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -19,7 +19,6 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; - zephyr,console = &cdc_acm_uart; zmk,underglow = &led_strip; zmk,matrix-transform = &default_transform; zmk,backlight = &backlight; @@ -68,11 +67,8 @@ status = "okay"; }; -&usbd { +zephyr_udc0: &usbd { status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - }; }; &flash0 { From 9da0f3445542508a3c69b1e11bd35d350760dfc0 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:46:22 -0500 Subject: [PATCH 06/21] refactor: consolidate PWM/backlight config --- config/boards/arm/corne/corne.dtsi | 40 ++++++++++++++++--------- config/boards/arm/corne/corne_left.dts | 22 +------------- config/boards/arm/corne/corne_right.dts | 21 +------------ 3 files changed, 28 insertions(+), 55 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index aa87bccd4..1a1c9cce8 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -49,6 +49,13 @@ RC(4,7) >; }; + + backlight: pwmleds { + compatible = "pwm-leds"; + pwm_led_0 { + pwms = <&pwm0 0 PWM_MSEC(1) PWM_POLARITY_NORMAL>; + }; + }; }; &adc { @@ -125,6 +132,18 @@ zephyr_udc0: &usbd { }; }; + pwm0_default: pwm0_default { + group1 { + psels = ; + }; + }; + pwm0_sleep: pwm0_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; + spi3_default: spi3_default { group1 { psels = ; // WS2812_VEXT_DATA @@ -147,6 +166,13 @@ nice_view_spi: &spi0 { cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; }; +&pwm0 { + status = "okay"; + pinctrl-0 = <&pwm0_default>; + pinctrl-1 = <&pwm0_sleep>; + pinctrl-names = "default", "sleep"; +}; + &spi3 { status = "okay"; @@ -170,17 +196,3 @@ nice_view_spi: &spi0 { color-mapping = ; }; }; -/ { - backlight: pwmleds { - compatible = "pwm-leds"; - pwm_led_0 { - pwms = <&pwm0 0 PWM_MSEC(1) PWM_POLARITY_NORMAL>; - }; - }; -}; -&pwm0 { - status = "okay"; - pinctrl-0 = <&pwm0_default>; - pinctrl-1 = <&pwm0_sleep>; - pinctrl-names = "default", "sleep"; -}; diff --git a/config/boards/arm/corne/corne_left.dts b/config/boards/arm/corne/corne_left.dts index e17503ffa..564150f75 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/config/boards/arm/corne/corne_left.dts @@ -1,6 +1,6 @@ /* * -* Copyright (c) 2021 Darryl deHaan +* Copyright (c) 2024 The ZMK Contributors * SPDX-License-Identifier: MIT * */ @@ -10,7 +10,6 @@ /{ chosen { zmk,battery = &vbatt; - zmk,backlight = &backlight; }; kscan0: kscan { @@ -53,23 +52,4 @@ b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; status = "okay"; }; -&pinctrl { - // Other pinctrl definitions for other hardware - pwm0_default: pwm0_default { - group1 { - psels = ; - }; - }; - pwm0_sleep: pwm0_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; -&pwm0 { - status = "okay"; - pinctrl-0 = <&pwm0_default>; - pinctrl-1 = <&pwm0_sleep>; - pinctrl-names = "default", "sleep"; }; diff --git a/config/boards/arm/corne/corne_right.dts b/config/boards/arm/corne/corne_right.dts index 07c09aa98..ae785c7da 100644 --- a/config/boards/arm/corne/corne_right.dts +++ b/config/boards/arm/corne/corne_right.dts @@ -1,6 +1,6 @@ /* * -* Copyright (c) 2021 Darryl deHaan +* Copyright (c) 2024 The ZMK Contributors * SPDX-License-Identifier: MIT * */ @@ -74,23 +74,4 @@ color-mapping = ; }; }; -&pinctrl { - // Other pinctrl definitions for other hardware - pwm0_default: pwm0_default { - group1 { - psels = ; - }; - }; - pwm0_sleep: pwm0_sleep { - group1 { - psels = ; - low-power-enable; - }; - }; -}; -&pwm0 { - status = "okay"; - pinctrl-0 = <&pwm0_default>; - pinctrl-1 = <&pwm0_sleep>; - pinctrl-names = "default", "sleep"; }; From b85964cf009b33e2793e1c2c345cb4efce56be25 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:55:04 -0500 Subject: [PATCH 07/21] refactor: consolidate encoder config --- config/boards/arm/corne/corne.dtsi | 23 ++++++++++++----------- config/boards/arm/corne/corne.zmk.yml | 1 + config/boards/arm/corne/corne_left.dts | 2 -- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 1a1c9cce8..643cf565f 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -24,19 +24,20 @@ zmk,backlight = &backlight; }; - left_encoder: encoder_left { - compatible = "alps,ec11"; - label = "LEFT_ENCODER"; - resolution = <4>; - steps = <40>; - status = "disabled"; - }; + left_encoder: encoder_left { + compatible = "alps,ec11"; + a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + steps = <40>; + status = "disabled"; + }; sensors { - compatible = "zmk,keymap-sensors"; - sensors = <&left_encoder>; - }; - + compatible = "zmk,keymap-sensors"; + triggers-per-rotation = <20>; + sensors = <&left_encoder>; + }; + default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; diff --git a/config/boards/arm/corne/corne.zmk.yml b/config/boards/arm/corne/corne.zmk.yml index 090232db7..fe01392cc 100644 --- a/config/boards/arm/corne/corne.zmk.yml +++ b/config/boards/arm/corne/corne.zmk.yml @@ -7,6 +7,7 @@ arch: arm features: - keys - display + - encoder outputs: - usb - ble diff --git a/config/boards/arm/corne/corne_left.dts b/config/boards/arm/corne/corne_left.dts index 564150f75..3103028fb 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/config/boards/arm/corne/corne_left.dts @@ -48,8 +48,6 @@ }; &left_encoder { - a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; - b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; status = "okay"; }; }; From 9a013fe0eb314d8b233321c3c4df3feb2016a21c Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:02:21 -0500 Subject: [PATCH 08/21] refactor: consolidate power nodes --- config/boards/arm/corne/corne.dtsi | 11 +++++++++++ config/boards/arm/corne/corne_left.dts | 14 -------------- config/boards/arm/corne/corne_right.dts | 14 -------------- 3 files changed, 11 insertions(+), 28 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 643cf565f..5b9053e0b 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -19,11 +19,22 @@ zephyr,sram = &sram0; zephyr,flash = &flash0; zmk,kscan = &kscan0; + zmk,battery = &vbatt; zmk,underglow = &led_strip; zmk,matrix-transform = &default_transform; zmk,backlight = &backlight; }; + vbatt: vbatt { + compatible = "zmk,battery-nrf-vddh"; + }; + + EXT_POWER { + compatible = "zmk,ext-power-generic"; + control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + init-delay-ms = <50>; + }; + left_encoder: encoder_left { compatible = "alps,ec11"; a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; diff --git a/config/boards/arm/corne/corne_left.dts b/config/boards/arm/corne/corne_left.dts index 3103028fb..d4432cd66 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/config/boards/arm/corne/corne_left.dts @@ -8,9 +8,6 @@ #include "corne.dtsi" /{ - chosen { - zmk,battery = &vbatt; - }; kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; @@ -34,17 +31,6 @@ ; }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-nrf-vddh"; - }; - }; &left_encoder { diff --git a/config/boards/arm/corne/corne_right.dts b/config/boards/arm/corne/corne_right.dts index ae785c7da..86588d83e 100644 --- a/config/boards/arm/corne/corne_right.dts +++ b/config/boards/arm/corne/corne_right.dts @@ -7,9 +7,6 @@ #include "corne.dtsi" /{ - chosen { - zmk,battery = &vbatt; - }; kscan0: kscan { compatible = "zmk,kscan-gpio-matrix"; @@ -34,17 +31,6 @@ ; }; - ext-power { - compatible = "zmk,ext-power-generic"; - label = "EXT_POWER"; - control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; - init-delay-ms = <50>; - }; - - vbatt: vbatt { - compatible = "zmk,battery-nrf-vddh"; - init-delay-ms = <50>; - }; }; &default_transform { From 4bdeb73cc5cc65be74fb1e42eda017db88761fe3 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:05:01 -0500 Subject: [PATCH 09/21] refactor: consolidate and reorder kscan --- config/boards/arm/corne/corne.dtsi | 32 +++++++++++++++++++++---- config/boards/arm/corne/corne_left.dts | 26 -------------------- config/boards/arm/corne/corne_right.dts | 28 +--------------------- 3 files changed, 28 insertions(+), 58 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 5b9053e0b..5648288b6 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -49,16 +49,38 @@ sensors = <&left_encoder>; }; + kscan0: kscan { + compatible = "zmk,kscan-gpio-matrix"; + wakeup-source; + diode-direction = "col2row"; + row-gpios + = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> + ; + col-gpios + = <&gpio0 3 GPIO_ACTIVE_HIGH> + , <&gpio0 28 GPIO_ACTIVE_HIGH> + , <&gpio0 30 GPIO_ACTIVE_HIGH> + , <&gpio0 21 GPIO_ACTIVE_HIGH> + , <&gpio0 23 GPIO_ACTIVE_HIGH> + , <&gpio0 22 GPIO_ACTIVE_HIGH> + , <&gpio0 29 GPIO_ACTIVE_HIGH> + ; + }; + default_transform: keymap_transform_0 { compatible = "zmk,matrix-transform"; columns = <14>; rows = <5>; map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) - RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,7) RC(3,8) RC(3,9) RC(3,10) - RC(4,7) + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,12) RC(0,13) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,12) RC(1,13) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,12) RC(2,13) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,12) RC(3,13) RC(3,7) RC(3,8) + RC(4,12) >; }; diff --git a/config/boards/arm/corne/corne_left.dts b/config/boards/arm/corne/corne_left.dts index d4432cd66..4a1529520 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/config/boards/arm/corne/corne_left.dts @@ -7,32 +7,6 @@ #include "corne.dtsi" -/{ - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - diode-direction = "col2row"; - row-gpios - = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - - col-gpios - = <&gpio0 3 GPIO_ACTIVE_HIGH> - , <&gpio0 28 GPIO_ACTIVE_HIGH> - , <&gpio0 30 GPIO_ACTIVE_HIGH> - , <&gpio0 21 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - , <&gpio0 22 GPIO_ACTIVE_HIGH> - ; - }; - -}; - &left_encoder { status = "okay"; }; diff --git a/config/boards/arm/corne/corne_right.dts b/config/boards/arm/corne/corne_right.dts index 86588d83e..139df7c23 100644 --- a/config/boards/arm/corne/corne_right.dts +++ b/config/boards/arm/corne/corne_right.dts @@ -4,35 +4,9 @@ * SPDX-License-Identifier: MIT * */ -#include "corne.dtsi" - -/{ - - kscan0: kscan { - compatible = "zmk,kscan-gpio-matrix"; - wakeup-source; - diode-direction = "col2row"; - row-gpios - = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - , <&gpio1 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)> - ; - - col-gpios - = <&gpio0 22 GPIO_ACTIVE_HIGH> - , <&gpio0 29 GPIO_ACTIVE_HIGH> - , <&gpio0 3 GPIO_ACTIVE_HIGH> - , <&gpio0 28 GPIO_ACTIVE_HIGH> - , <&gpio0 30 GPIO_ACTIVE_HIGH> - , <&gpio0 21 GPIO_ACTIVE_HIGH> - , <&gpio0 23 GPIO_ACTIVE_HIGH> - ; - }; +#include "corne.dtsi" -}; &default_transform { col-offset = <7>; }; From 3888ae0d04e0ebc31c4b5b6efca36acebc580b9d Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:06:15 -0500 Subject: [PATCH 10/21] refactor: consolidate RGB settings --- config/boards/arm/corne/corne.dtsi | 2 +- config/boards/arm/corne/corne.zmk.yml | 1 + config/boards/arm/corne/corne_left.dts | 1 - config/boards/arm/corne/corne_right.dts | 25 ------------------------- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index 5648288b6..fc2384dc4 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -223,7 +223,7 @@ nice_view_spi: &spi0 { spi-max-frequency = <4000000>; /* WS2812 */ - chain-length = <6>; + chain-length = <21>; spi-one-frame = <0x70>; spi-zero-frame = <0x40>; diff --git a/config/boards/arm/corne/corne.zmk.yml b/config/boards/arm/corne/corne.zmk.yml index fe01392cc..d7bae0553 100644 --- a/config/boards/arm/corne/corne.zmk.yml +++ b/config/boards/arm/corne/corne.zmk.yml @@ -7,6 +7,7 @@ arch: arm features: - keys - display + - underglow - encoder outputs: - usb diff --git a/config/boards/arm/corne/corne_left.dts b/config/boards/arm/corne/corne_left.dts index 4a1529520..57a25064d 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/config/boards/arm/corne/corne_left.dts @@ -10,4 +10,3 @@ &left_encoder { status = "okay"; }; -}; diff --git a/config/boards/arm/corne/corne_right.dts b/config/boards/arm/corne/corne_right.dts index 139df7c23..744c7b409 100644 --- a/config/boards/arm/corne/corne_right.dts +++ b/config/boards/arm/corne/corne_right.dts @@ -10,28 +10,3 @@ &default_transform { col-offset = <7>; }; - -&spi3 { - compatible = "nordic,nrf-spim"; - status = "okay"; - - pinctrl-0 = <&spi3_default>; - pinctrl-1 = <&spi3_sleep>; - pinctrl-names = "default", "sleep"; - - led_strip: ws2812@0 { - compatible = "worldsemi,ws2812-spi"; - - /* SPI */ - reg = <0>; /* ignored, but necessary for SPI bindings */ - spi-max-frequency = <4000000>; - - /* WS2812 */ - chain-length = <7>; /* 6 keys have underglow at the moment */ - spi-one-frame = <0x70>; - spi-zero-frame = <0x40>; - - color-mapping = ; - }; -}; -}; From 660b54e02260cf01994e1aa7239e744383a36de1 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:10:58 -0500 Subject: [PATCH 11/21] style: clean up spacing --- config/boards/arm/corne/Kconfig.board | 5 +---- config/boards/arm/corne/corne.dtsi | 5 ++--- config/boards/arm/corne/corne.zmk.yml | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/config/boards/arm/corne/Kconfig.board b/config/boards/arm/corne/Kconfig.board index 8886156d1..ccdf02030 100644 --- a/config/boards/arm/corne/Kconfig.board +++ b/config/boards/arm/corne/Kconfig.board @@ -1,5 +1,5 @@ # -# Copyright (c) 2022 Darryl deHaan +# Copyright (c) 2024 The ZMK Contributors # SPDX-License-Identifier: MIT # @@ -7,9 +7,6 @@ config BOARD_CORNE_LEFT bool "corne left" depends on SOC_NRF52840_QIAA - config BOARD_CORNE_RIGHT bool "corne right" depends on SOC_NRF52840_QIAA - - diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index fc2384dc4..d078258dd 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -125,6 +125,7 @@ zephyr_udc0: &usbd { sd_partition: partition@0 { reg = <0x00000000 0x00026000>; }; + code_partition: partition@26000 { reg = <0x00026000 0x000c6000>; }; @@ -132,9 +133,7 @@ zephyr_udc0: &usbd { /* * The flash starting at 0x000ec000 and ending at * 0x000f3fff is reserved for use by the application. - */ - - /* + * * Storage partition will be used by FCB/LittleFS/NVS * if enabled. */ diff --git a/config/boards/arm/corne/corne.zmk.yml b/config/boards/arm/corne/corne.zmk.yml index d7bae0553..562427d07 100644 --- a/config/boards/arm/corne/corne.zmk.yml +++ b/config/boards/arm/corne/corne.zmk.yml @@ -14,4 +14,4 @@ outputs: - ble siblings: - corne_left - - corne_right \ No newline at end of file + - corne_right From 330d75d9ab28270e47fb2632277311843eb1f299 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:38:08 -0500 Subject: [PATCH 12/21] refactor: streamline default board config Remove redundant or ineffective settings, lower intrusiveness --- config/boards/arm/corne/Kconfig.defconfig | 2 ++ config/boards/arm/corne/corne_left_defconfig | 19 ---------------- config/boards/arm/corne/corne_right_defconfig | 22 +------------------ 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/config/boards/arm/corne/Kconfig.defconfig b/config/boards/arm/corne/Kconfig.defconfig index f4f509220..00fa85c52 100644 --- a/config/boards/arm/corne/Kconfig.defconfig +++ b/config/boards/arm/corne/Kconfig.defconfig @@ -29,6 +29,8 @@ config BOARD_ENABLE_DCDC_HV select SOC_DCDC_NRF52X_HV depends on (BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT) +config ZMK_SLEEP + default y config ZMK_SPLIT default y diff --git a/config/boards/arm/corne/corne_left_defconfig b/config/boards/arm/corne/corne_left_defconfig index 30a26b042..681c3a09b 100644 --- a/config/boards/arm/corne/corne_left_defconfig +++ b/config/boards/arm/corne/corne_left_defconfig @@ -12,8 +12,6 @@ CONFIG_ZMK_SLEEP=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y - - # Enable MPU CONFIG_ARM_MPU=y @@ -36,29 +34,12 @@ CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y -# Enable 32kHz crystal -CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y - CONFIG_ZMK_USB=y CONFIG_ZMK_BLE=y #EXT POWER CONFIG_ZMK_EXT_POWER=y -#BLE-passkey -CONFIG_ZMK_BLE_PASSKEY_ENTRY=n - -#BLE-clean -CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START=n - -#usb-name -CONFIG_USB_DEVICE_MANUFACTURER="corne" - -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n -#CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y - #EC11 enable CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y diff --git a/config/boards/arm/corne/corne_right_defconfig b/config/boards/arm/corne/corne_right_defconfig index dca513bee..3840a1841 100644 --- a/config/boards/arm/corne/corne_right_defconfig +++ b/config/boards/arm/corne/corne_right_defconfig @@ -6,13 +6,11 @@ CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_NRF52840_QIAA=y CONFIG_BOARD_CORNE_RIGHT=y -CONFIG_ZMK_SLEEP=y + # Enable 32kHz crystal CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y - - # Enable MPU CONFIG_ARM_MPU=y @@ -35,26 +33,8 @@ CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y -# Enable 32kHz crystal -CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y -CONFIG_CLOCK_CONTROL_NRF_K32SRC_30PPM=y - CONFIG_ZMK_USB=n CONFIG_ZMK_BLE=y #EXT POWER CONFIG_ZMK_EXT_POWER=y - -#BLE-passkey -CONFIG_ZMK_BLE_PASSKEY_ENTRY=n - -#BLE-clean -CONFIG_ZMK_BLE_CLEAR_BONDS_ON_START=n - -#usb-name -CONFIG_USB_DEVICE_MANUFACTURER="corne" - -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n - - From 6866e9a1a504e605321ef4e3c2be566708bfc08d Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:14:56 -0500 Subject: [PATCH 13/21] refactor: streamline default user config Remove redundant settings, add additional comments, reorganize --- config/corne.conf | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/config/corne.conf b/config/corne.conf index 84b5d4f72..384525153 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -5,33 +5,28 @@ CONFIG_WS2812_STRIP=y CONFIG_ZMK_RGB_UNDERGLOW=y -CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n -CONFIG_ZMK_RGB_UNDERGLOW_BRT_MAX=100 CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y -CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_USB=n CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=160 CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 +# Uncomment the following line to enable NKRO +#CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y +# Some operating systems have problems with full support for consumer keycodes. +# Uncomment the following line if keycodes labeled "consumer" like C_AC_SEARCH don't work #CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y #EC11 enable CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y -#EXT POWER -CONFIG_ZMK_EXT_POWER=y - # Mouse clicks CONFIG_ZMK_MOUSE=y -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_HID_REPORT_TYPE_NKRO=n CONFIG_ZMK_BACKLIGHT=y CONFIG_ZMK_BACKLIGHT_BRT_START=100 -CONFIG_ZMK_BACKLIGHT_ON_START=y -CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=n -CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 +# Uncomment the following line to increase the keyboard's wireless range +#CONFIG_BT_CTLR_TX_PWR_PLUS_8=y From 845c77e2648fef954d816bcc9bbc279cf2048c03 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:01:52 -0500 Subject: [PATCH 14/21] refactor: keymap editor JSON --- config/corne.json | 140 +++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/config/corne.json b/config/corne.json index 3c1d5903a..583cc342d 100644 --- a/config/corne.json +++ b/config/corne.json @@ -1,72 +1,72 @@ { - "id": "corne", - "name": "Corne", - "layouts": { - "default_layout": { - "name": "default_layout", - "layout": [ - { "row": 0, "col": 0, "x": 1.5, "y": 1.13, "label": "0\n0" }, - { "row": 0, "col": 1, "x": 2.5, "y": 1.13, "label": "0\n1" }, - { "row": 0, "col": 2, "x": 3.5, "y": 0.75, "label": "0\n2" }, - { "row": 0, "col": 3, "x": 4.5, "y": 0.63, "label": "0\n3" }, - { "row": 0, "col": 4, "x": 5.5, "y": 0.75, "label": "0\n4" }, - { "row": 0, "col": 5, "x": 6.5, "y": 1, "label": "0\n5" }, - { "row": 0, "col": 7, "x": 9.25, "y": 0.25, "label": "0\n7" }, - { "row": 0, "col": 8, "x": 12, "y": 1, "label": "0\n8" }, - { "row": 0, "col": 9, "x": 13, "y": 0.75, "label": "0\n9" }, - { "row": 0, "col": 10, "x": 14, "y": 0.63, "label": "0\n10" }, - { "row": 0, "col": 11, "x": 15, "y": 0.75, "label": "0\n11" }, - { "row": 0, "col": 12, "x": 16, "y": 1.13, "label": "0\n12" }, - { "row": 0, "col": 13, "x": 17, "y": 1.13, "label": "0\n13" }, - - { "row": 1, "col": 0, "x": 1.5, "y": 2.13, "label": "1\n0" }, - { "row": 1, "col": 1, "x": 2.5, "y": 2.13, "label": "1\n1" }, - { "row": 1, "col": 2, "x": 3.5, "y": 1.75, "label": "1\n2" }, - { "row": 1, "col": 3, "x": 4.5, "y": 1.63, "label": "1\n3" }, - { "row": 1, "col": 4, "x": 5.5, "y": 1.75, "label": "1\n4" }, - { "row": 1, "col": 5, "x": 6.5, "y": 2, "label": "1\n5" }, - { "row": 1, "col": 7, "x": 9.25, "y": 2.25, "label": "1\n7" }, - { "row": 1, "col": 8, "x": 12, "y": 2, "label": "1\n8" }, - { "row": 1, "col": 9, "x": 13, "y": 1.75, "label": "1\n9" }, - { "row": 1, "col": 10, "x": 14, "y": 1.63, "label": "1\n10" }, - { "row": 1, "col": 11, "x": 15, "y": 1.75, "label": "1\n11" }, - { "row": 1, "col": 12, "x": 16, "y": 2.13, "label": "1\n12" }, - { "row": 1, "col": 13, "x": 17, "y": 2.13, "label": "1\n13" }, - - { "row": 2, "col": 0, "x": 1.5, "y": 3.13, "label": "2\n0" }, - { "row": 2, "col": 1, "x": 2.5, "y": 3.13, "label": "2\n1" }, - { "row": 2, "col": 2, "x": 3.5, "y": 2.75, "label": "2\n2" }, - { "row": 2, "col": 3, "x": 4.5, "y": 2.63, "label": "2\n3" }, - { "row": 2, "col": 4, "x": 5.5, "y": 2.75, "label": "2\n4" }, - { "row": 2, "col": 5, "x": 6.5, "y": 3, "label": "2\n5" }, - { "row": 2, "col": 7, "x": 8.25, "y": 1.25, "label": "2\n7" }, - { "row": 2, "col": 8, "x": 12, "y": 3, "label": "2\n8" }, - { "row": 2, "col": 9, "x": 13, "y": 2.75, "label": "2\n9" }, - { "row": 2, "col": 10, "x": 14, "y": 2.63, "label": "2\n10" }, - { "row": 2, "col": 11, "x": 15, "y": 2.75, "label": "2\n11" }, - { "row": 2, "col": 12, "x": 16, "y": 3.13, "label": "2\n12" }, - { "row": 2, "col": 13, "x": 17, "y": 3.13, "label": "2\n13" }, - { "row": 3, "col": 2, "x": 8, "y": 3.5, "label": "4\n2" }, - { "row": 3, "col": 3, "x": 5.5, "y": 4.25, "label": "3\n3" }, - { "row": 3, "col": 4, "x": 7, "y": 4.25, "label": "3\n4", "r": 30, "rx": 6.5, "ry": 4.25 }, - { "row": 3, "col": 5, "x": 8.25, "y": 3.75, "label": "3\n5", "r": 30, "rx": 6.5, "ry": 4.25, "h": 1.5 }, - { "row": 3, "col": 7, "x": 10.25, "y": 1.25, "label": "3\n7" }, - { "row": 3, "col": 8, "x": 10.25, "y": 3.75, "label": "3\n8", "r": -30, "rx": 13, "ry": 4.25, "h": 1.5 }, - { "row": 3, "col": 9, "x": 11.5, "y": 4.25, "label": "3\n9", "r": -30, "rx": 13, "ry": 4.25 }, - { "row": 3, "col": 10, "x": 13, "y": 4.25, "label": "3\n10" }, + "id": "corne", + "name": "Corne", + "layouts": { + "default_layout": { + "name": "default_layout", + "layout": [ + { "row": 0, "col": 0, "x": 0, "y": 0.37 }, + { "row": 0, "col": 1, "x": 1, "y": 0.37 }, + { "row": 0, "col": 2, "x": 2, "y": 0.12 }, + { "row": 0, "col": 3, "x": 3, "y": 0 }, + { "row": 0, "col": 4, "x": 4, "y": 0.12 }, + { "row": 0, "col": 5, "x": 5, "y": 0.24 }, + { "row": 0, "col": 9, "x": 9.25, "y": 0.24, "label": "5-way up" }, + { "row": 0, "col": 11, "x": 11.5, "y": 0.24 }, + { "row": 0, "col": 12, "x": 12.5, "y": 0.12 }, + { "row": 0, "col": 13, "x": 13.5, "y": 0 }, + { "row": 0, "col": 14, "x": 14.5, "y": 0.12 }, + { "row": 0, "col": 15, "x": 15.5, "y": 0.37 }, + { "row": 0, "col": 16, "x": 16.5, "y": 0.37 }, - { "row": 4, "col": 7, "x": 9.25, "y": 1.25, "label": "4\n7" } - ] - } - }, - "sensors": [ - { - "ref": "left_encoder", - "name": "encoder_left", - "identifier": "encoder_left", - "compatible": "alps,ec11", - "label": "LEFT_ENCODER", - "enabled": true - } - ] - } \ No newline at end of file + { "row": 1, "col": 0, "x": 0, "y": 1.37 }, + { "row": 1, "col": 1, "x": 1, "y": 1.37 }, + { "row": 1, "col": 2, "x": 2, "y": 1.12 }, + { "row": 1, "col": 3, "x": 3, "y": 1 }, + { "row": 1, "col": 4, "x": 4, "y": 1.12 }, + { "row": 1, "col": 5, "x": 5, "y": 1.24 }, + { "row": 1, "col": 8, "x": 8.25, "y": 1.24, "label": "5-way left" }, + { "row": 1, "col": 9, "x": 9.25, "y": 1.24, "label": "5-way press" }, + { "row": 1, "col": 10, "x": 10.25, "y": 1.24, "label": "5-way right" }, + { "row": 1, "col": 11, "x": 11.5, "y": 1.24 }, + { "row": 1, "col": 12, "x": 12.5, "y": 1.12 }, + { "row": 1, "col": 13, "x": 13.5, "y": 1 }, + { "row": 1, "col": 14, "x": 14.5, "y": 1.12 }, + { "row": 1, "col": 15, "x": 15.5, "y": 1.37 }, + { "row": 1, "col": 16, "x": 16.5, "y": 1.37 }, + + { "row": 2, "col": 0, "x": 0, "y": 2.37 }, + { "row": 2, "col": 1, "x": 1, "y": 2.37 }, + { "row": 2, "col": 2, "x": 2, "y": 2.12 }, + { "row": 2, "col": 3, "x": 3, "y": 2 }, + { "row": 2, "col": 4, "x": 4, "y": 2.12 }, + { "row": 2, "col": 5, "x": 5, "y": 2.24 }, + { "row": 2, "col": 6, "x": 6.25, "y": 2.24, "label": "4\n2" }, + { "row": 2, "col": 9, "x": 9.25, "y": 2.24, "label": "5-way down" }, + { "row": 2, "col": 11, "x": 11.5, "y": 2.24 }, + { "row": 2, "col": 12, "x": 12.5, "y": 2.12 }, + { "row": 2, "col": 13, "x": 13.5, "y": 2 }, + { "row": 2, "col": 14, "x": 14.5, "y": 2.12 }, + { "row": 2, "col": 15, "x": 15.5, "y": 2.37 }, + { "row": 2, "col": 16, "x": 16.5, "y": 2.37 }, + + { "row": 3, "col": 3, "x": 3.5, "y": 3.12 }, + { "row": 3, "col": 4, "x": 4.5, "y": 3.12, "r": 12, "rx": 4.5, "ry": 4.12 }, + { "row": 3, "col": 5, "x": 5.5, "y": 3.12, "r": 24, "rx": 5.15, "ry": 4.33 }, + { "row": 3, "col": 11, "x": 11, "y": 3.12, "r": -24, "rx": 12.3, "ry": 4.33 }, + { "row": 3, "col": 12, "x": 12, "y": 3.12, "r": -12, "rx": 13, "ry": 4.12 }, + { "row": 3, "col": 13, "x": 13, "y": 3.12 } + ] + } + }, + "sensors": [ + { + "ref": "left_encoder", + "name": "encoder_left", + "identifier": "encoder_left", + "compatible": "alps,ec11", + "label": "LEFT_ENCODER", + "enabled": true + } + ] +} From d6b2ce7e6ac55ed29b3f1eea38332fa5428d5499 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:25:31 -0500 Subject: [PATCH 15/21] refactor: reorganize transform & keymap --- config/boards/arm/corne/corne.dtsi | 9 +++-- config/corne.keymap | 57 +++++++++--------------------- 2 files changed, 20 insertions(+), 46 deletions(-) diff --git a/config/boards/arm/corne/corne.dtsi b/config/boards/arm/corne/corne.dtsi index d078258dd..42d6aba47 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/config/boards/arm/corne/corne.dtsi @@ -76,11 +76,10 @@ columns = <14>; rows = <5>; map = < - RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,12) RC(0,13) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) - RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,12) RC(1,13) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) - RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,12) RC(2,13) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) - RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,12) RC(3,13) RC(3,7) RC(3,8) - RC(4,12) + RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,12) RC(0,13) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) + RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(2,12) RC(4,12) RC(3,12) RC(1,13) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) + RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(3,2) RC(1,12) RC(2,13) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) + RC(3,3) RC(3,4) RC(3,5) RC(3,13) RC(3,7) RC(3,8) >; }; diff --git a/config/corne.keymap b/config/corne.keymap index 079cb6b1c..1dfd78c51 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -26,19 +26,11 @@ default_layer { display-name = "QWERTY"; - // -------------------------------------------------------------------------------- - // | TAB | Q | W | E | R | T | ↑ | Y | U | I | O | P | BKSP | &kp UP_ARROW - // | SHIFT | A | S | D | F | G | ↓ | H | J | K | L | ; | ' | - // | CTRL | Z | X | C | V | B | ← | N | M | , | . | / | ESC | - // | GUI | LWR | SPC | → | ENT | RSE | ALT | - // enter - bindings = < -&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp UP_ARROW &kp Y &kp U &kp I &kp O &kp P &kp BSPC -&td0 &kp A &kp S &kp D &kp F &kp G &kp DOWN_ARROW &kp H &kp J &kp K &kp L &kp SEMI &kp SQT -&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp LEFT_ARROW &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC - &kp SPACE &kp LGUI &mo 1 < 3 SPACE &kp RIGHT_ARROW < 3 ENTER &mo 2 &kp RALT - &kp ENTER +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp UP &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&td0 &kp A &kp S &kp D &kp F &kp G &kp LEFT &kp ENTER &kp RIGHT &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp SPACE &kp DOWN &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC + &kp LGUI &mo 1 < 3 SPACE < 3 ENTER &mo 2 &kp RALT >; sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; @@ -46,19 +38,11 @@ lower_layer { display-name = "NUMBER"; - - // ----------------------------------------------------------------------------------------- - // | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | - // | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | | - // | SHFT | | | | | | | | | | | | | - // | GUI | | SPC | | ENT | | ALT | - bindings = < -&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &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 &trans &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 &trans &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 &trans &kp INS &kp DEL &trans - &mkp LCLK +&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &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 &trans &mkp LCLK &trans &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 &kp C_MUTE &trans &rgb_ug RGB_EFR &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_BRD &kp END &kp PG_DN + &trans &trans &trans &kp INS &kp DEL &trans >; sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; @@ -66,19 +50,11 @@ raise_layer { display-name = "SYMBOL"; - - // ----------------------------------------------------------------------------------------- - // | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP | - // | CTRL | | | | | | | - | = | [ | ] | \ | ` | - // | SHFT | | | | | | | _ | + | { | } | "|" | ~ | - // | GUI | | SPC | | ENT | | ALT | - bindings = < -&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &trans &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC -&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE -&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &trans &trans &trans &kp SPACE &trans &kp RET &trans &trans - &mkp LCLK +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &trans &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC +&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE +&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &kp C_MUTE &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &trans &trans &kp SPACE &kp RET &trans &trans >; sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; @@ -87,11 +63,10 @@ layer_3 { display-name = "Fn"; bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 -&trans &sys_reset &trans &bootloader &trans &mkp MB5 &trans &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK - &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans - &mkp LCLK +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 +&trans &sys_reset &trans &bootloader &trans &mkp MB5 &kp C_MUTE &trans &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK + &trans &trans &trans &trans &trans &trans >; sensor-bindings = <&rgb_encoder>; From 8565de648085bd6d0e183c0e8cea5dd4f00b6acf Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:34:29 -0500 Subject: [PATCH 16/21] refactor: rename and modularize --- .gitignore | 3 +-- README.md | 2 +- .../arm/eyelash_corne}/Kconfig.board | 8 ++++---- .../arm/eyelash_corne}/Kconfig.defconfig | 14 +++++++------- .../arm/eyelash_corne}/board.cmake | 0 .../arm/eyelash_corne/eyelash_corne.dtsi | 4 ++-- .../arm/eyelash_corne/eyelash_corne.yaml | 6 +++--- boards/arm/eyelash_corne/eyelash_corne.zmk.yml | 17 +++++++++++++++++ .../arm/eyelash_corne/eyelash_corne_left.dts | 2 +- .../eyelash_corne/eyelash_corne_left_defconfig | 3 +-- .../arm/eyelash_corne/eyelash_corne_right.dts | 2 +- .../eyelash_corne/eyelash_corne_right_defconfig | 2 +- build.yaml | 6 +++--- config/boards/arm/corne/corne.zmk.yml | 17 ----------------- config/{corne.conf => eyelash_corne.conf} | 0 config/{corne.json => eyelash_corne.json} | 4 ++-- config/{corne.keymap => eyelash_corne.keymap} | 0 config/west.yml | 3 +++ zephyr/module.yml | 3 +++ 19 files changed, 50 insertions(+), 46 deletions(-) rename {config/boards/arm/corne => boards/arm/eyelash_corne}/Kconfig.board (53%) rename {config/boards/arm/corne => boards/arm/eyelash_corne}/Kconfig.defconfig (68%) rename {config/boards/arm/corne => boards/arm/eyelash_corne}/board.cmake (100%) rename config/boards/arm/corne/corne.dtsi => boards/arm/eyelash_corne/eyelash_corne.dtsi (98%) rename config/boards/arm/corne/corne.yaml => boards/arm/eyelash_corne/eyelash_corne.yaml (63%) create mode 100644 boards/arm/eyelash_corne/eyelash_corne.zmk.yml rename config/boards/arm/corne/corne_left.dts => boards/arm/eyelash_corne/eyelash_corne_left.dts (80%) rename config/boards/arm/corne/corne_left_defconfig => boards/arm/eyelash_corne/eyelash_corne_left_defconfig (93%) rename config/boards/arm/corne/corne_right.dts => boards/arm/eyelash_corne/eyelash_corne_right.dts (81%) rename config/boards/arm/corne/corne_right_defconfig => boards/arm/eyelash_corne/eyelash_corne_right_defconfig (94%) delete mode 100644 config/boards/arm/corne/corne.zmk.yml rename config/{corne.conf => eyelash_corne.conf} (100%) rename config/{corne.json => eyelash_corne.json} (98%) rename config/{corne.keymap => eyelash_corne.keymap} (100%) create mode 100644 zephyr/module.yml diff --git a/.gitignore b/.gitignore index 36f5dd94c..2a22fd661 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ build/ zmk/ -zephyr/ modules/ tools/ -.west/ \ No newline at end of file +.west/ diff --git a/README.md b/README.md index f8a2a64f7..77d175c3e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ if you need the 3D modle of this keyboard,you can connect me by Email。380465425@qq.com -# zmk-config-corne +# 睫毛外设店 (Eyelash Peripherals) Corne diff --git a/config/boards/arm/corne/Kconfig.board b/boards/arm/eyelash_corne/Kconfig.board similarity index 53% rename from config/boards/arm/corne/Kconfig.board rename to boards/arm/eyelash_corne/Kconfig.board index ccdf02030..27596f9fe 100644 --- a/config/boards/arm/corne/Kconfig.board +++ b/boards/arm/eyelash_corne/Kconfig.board @@ -3,10 +3,10 @@ # SPDX-License-Identifier: MIT # -config BOARD_CORNE_LEFT - bool "corne left" +config BOARD_EYELASH_CORNE_LEFT + bool "eyelash_corne left" depends on SOC_NRF52840_QIAA -config BOARD_CORNE_RIGHT - bool "corne right" +config BOARD_EYELASH_CORNE_RIGHT + bool "eyelash_corne right" depends on SOC_NRF52840_QIAA diff --git a/config/boards/arm/corne/Kconfig.defconfig b/boards/arm/eyelash_corne/Kconfig.defconfig similarity index 68% rename from config/boards/arm/corne/Kconfig.defconfig rename to boards/arm/eyelash_corne/Kconfig.defconfig index 00fa85c52..c8f11bb5a 100644 --- a/config/boards/arm/corne/Kconfig.defconfig +++ b/boards/arm/eyelash_corne/Kconfig.defconfig @@ -3,20 +3,20 @@ # SPDX-License-Identifier: MIT # -if BOARD_CORNE_LEFT +if BOARD_EYELASH_CORNE_LEFT config ZMK_KEYBOARD_NAME - default "Corne" + default "Eyelash Corne" config ZMK_SPLIT_ROLE_CENTRAL default y -endif # BOARD_CORNE_LEFT +endif # BOARD_EYELASH_CORNE_LEFT -if BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT +if BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT config BOARD - default "corne" + default "eyelash_corne" config BOARD_ENABLE_DCDC bool "Enable DCDC mode" @@ -27,7 +27,7 @@ config BOARD_ENABLE_DCDC_HV bool "Enable High Voltage DCDC converter" default y select SOC_DCDC_NRF52X_HV - depends on (BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT) + depends on (BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT) config ZMK_SLEEP default y @@ -58,4 +58,4 @@ config LED_PWM endif # ZMK_BACKLIGHT -endif # BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT +endif # BOARD_EYELASH_CORNE_LEFT || BOARD_EYELASH_CORNE_RIGHT diff --git a/config/boards/arm/corne/board.cmake b/boards/arm/eyelash_corne/board.cmake similarity index 100% rename from config/boards/arm/corne/board.cmake rename to boards/arm/eyelash_corne/board.cmake diff --git a/config/boards/arm/corne/corne.dtsi b/boards/arm/eyelash_corne/eyelash_corne.dtsi similarity index 98% rename from config/boards/arm/corne/corne.dtsi rename to boards/arm/eyelash_corne/eyelash_corne.dtsi index 42d6aba47..3d00e3504 100644 --- a/config/boards/arm/corne/corne.dtsi +++ b/boards/arm/eyelash_corne/eyelash_corne.dtsi @@ -11,8 +11,8 @@ #include / { - model = "corne"; - compatible = "corne"; + model = "eyelash_corne"; + compatible = "eyelashperipherals,eyelash_corne"; chosen { zephyr,code-partition = &code_partition; diff --git a/config/boards/arm/corne/corne.yaml b/boards/arm/eyelash_corne/eyelash_corne.yaml similarity index 63% rename from config/boards/arm/corne/corne.yaml rename to boards/arm/eyelash_corne/eyelash_corne.yaml index 65d630062..b28db79af 100644 --- a/config/boards/arm/corne/corne.yaml +++ b/boards/arm/eyelash_corne/eyelash_corne.yaml @@ -1,6 +1,6 @@ -identifier: corne -name: Solfe -url: https://github.com/tokyo2006/zmk-config-corne +identifier: eyelash_corne +name: Eyelash Corne +url: https://github.com/a741725193/zmk-new_corne type: mcu arch: arm toolchain: diff --git a/boards/arm/eyelash_corne/eyelash_corne.zmk.yml b/boards/arm/eyelash_corne/eyelash_corne.zmk.yml new file mode 100644 index 000000000..962a4fa3c --- /dev/null +++ b/boards/arm/eyelash_corne/eyelash_corne.zmk.yml @@ -0,0 +1,17 @@ +file_format: "1" +id: eyelash_corne +name: Eyelash Corne +url: https://github.com/a741725193/zmk-new_corne +type: board +arch: arm +features: + - keys + - display + - underglow + - encoder +outputs: + - usb + - ble +siblings: + - eyelash_corne_left + - eyelash_corne_right diff --git a/config/boards/arm/corne/corne_left.dts b/boards/arm/eyelash_corne/eyelash_corne_left.dts similarity index 80% rename from config/boards/arm/corne/corne_left.dts rename to boards/arm/eyelash_corne/eyelash_corne_left.dts index 57a25064d..e784b86e5 100644 --- a/config/boards/arm/corne/corne_left.dts +++ b/boards/arm/eyelash_corne/eyelash_corne_left.dts @@ -5,7 +5,7 @@ * */ -#include "corne.dtsi" +#include "eyelash_corne.dtsi" &left_encoder { status = "okay"; diff --git a/config/boards/arm/corne/corne_left_defconfig b/boards/arm/eyelash_corne/eyelash_corne_left_defconfig similarity index 93% rename from config/boards/arm/corne/corne_left_defconfig rename to boards/arm/eyelash_corne/eyelash_corne_left_defconfig index 681c3a09b..3a04fcba9 100644 --- a/config/boards/arm/corne/corne_left_defconfig +++ b/boards/arm/eyelash_corne/eyelash_corne_left_defconfig @@ -5,8 +5,7 @@ CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNE_LEFT=y -CONFIG_ZMK_SLEEP=y +CONFIG_BOARD_EYELASH_CORNE_LEFT=y # Enable 32kHz crystal CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y diff --git a/config/boards/arm/corne/corne_right.dts b/boards/arm/eyelash_corne/eyelash_corne_right.dts similarity index 81% rename from config/boards/arm/corne/corne_right.dts rename to boards/arm/eyelash_corne/eyelash_corne_right.dts index 744c7b409..b7b4db139 100644 --- a/config/boards/arm/corne/corne_right.dts +++ b/boards/arm/eyelash_corne/eyelash_corne_right.dts @@ -5,7 +5,7 @@ * */ -#include "corne.dtsi" +#include "eyelash_corne.dtsi" &default_transform { col-offset = <7>; diff --git a/config/boards/arm/corne/corne_right_defconfig b/boards/arm/eyelash_corne/eyelash_corne_right_defconfig similarity index 94% rename from config/boards/arm/corne/corne_right_defconfig rename to boards/arm/eyelash_corne/eyelash_corne_right_defconfig index 3840a1841..11a9beac5 100644 --- a/config/boards/arm/corne/corne_right_defconfig +++ b/boards/arm/eyelash_corne/eyelash_corne_right_defconfig @@ -5,7 +5,7 @@ CONFIG_SOC_SERIES_NRF52X=y CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_CORNE_RIGHT=y +CONFIG_BOARD_EYELASH_CORNE_RIGHT=y # Enable 32kHz crystal CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y diff --git a/build.yaml b/build.yaml index fbde14d3c..95d4f4c63 100644 --- a/build.yaml +++ b/build.yaml @@ -1,11 +1,11 @@ --- include: - - board: corne_left + - board: eyelash_corne_left shield: nice_view #snippet: zmk-usb-logging # Uncomment to log over USB. - - board: corne_right + - board: eyelash_corne_right shield: nice_view #snippet: zmk-usb-logging - - board: corne_left + - board: eyelash_corne_left shield: settings_reset #snippet: zmk-usb-logging diff --git a/config/boards/arm/corne/corne.zmk.yml b/config/boards/arm/corne/corne.zmk.yml deleted file mode 100644 index 562427d07..000000000 --- a/config/boards/arm/corne/corne.zmk.yml +++ /dev/null @@ -1,17 +0,0 @@ -file_format: "1" -id: corne -name: Sofle -url: https://github.com/tokyo2006/zmk-config-corne -type: board -arch: arm -features: - - keys - - display - - underglow - - encoder -outputs: - - usb - - ble -siblings: - - corne_left - - corne_right diff --git a/config/corne.conf b/config/eyelash_corne.conf similarity index 100% rename from config/corne.conf rename to config/eyelash_corne.conf diff --git a/config/corne.json b/config/eyelash_corne.json similarity index 98% rename from config/corne.json rename to config/eyelash_corne.json index 583cc342d..13fbf37a0 100644 --- a/config/corne.json +++ b/config/eyelash_corne.json @@ -1,6 +1,6 @@ { - "id": "corne", - "name": "Corne", + "id": "eyelash_corne", + "name": "Eyelash Corne", "layouts": { "default_layout": { "name": "default_layout", diff --git a/config/corne.keymap b/config/eyelash_corne.keymap similarity index 100% rename from config/corne.keymap rename to config/eyelash_corne.keymap diff --git a/config/west.yml b/config/west.yml index d658e2390..eeff17912 100644 --- a/config/west.yml +++ b/config/west.yml @@ -7,6 +7,9 @@ manifest: # - https://zmk.dev/docs/features/modules # - https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects projects: + - name: eyelash_corne + url: https://github.com/a741725193/zmk-new_corne + revision: main - name: zmk remote: zmkfirmware revision: main diff --git a/zephyr/module.yml b/zephyr/module.yml new file mode 100644 index 000000000..165b62365 --- /dev/null +++ b/zephyr/module.yml @@ -0,0 +1,3 @@ +build: + settings: + board_root: . From 7c290623248de514323d8a9b5d4553d7a8988e7d Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:39:21 -0500 Subject: [PATCH 17/21] refactor: keymap-drawer config --- .github/workflows/build.yml | 20 +- .github/workflows/draw.yml | 18 + README.md | 3 +- keymap-drawer/corne.svg | 1336 ----------------------------------- keymap-drawer/corne.yaml | 198 ------ keymap-drawer/sofle.svg | 917 ------------------------ keymap-drawer/sofle.yaml | 132 ---- 7 files changed, 22 insertions(+), 2602 deletions(-) create mode 100644 .github/workflows/draw.yml delete mode 100644 keymap-drawer/corne.svg delete mode 100644 keymap-drawer/corne.yaml delete mode 100644 keymap-drawer/sofle.svg delete mode 100644 keymap-drawer/sofle.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 932dbb838..83941f12b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,25 +2,9 @@ name: Build ZMK firmware on: workflow_dispatch: push: - paths: - - "config/**" + paths-ignore: + - "keymap-drawer/**" jobs: build: uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main - draw: - uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main - permissions: - contents: write - with: - commit_message: "[Draw] ${{ github.event.head_commit.message }}" - amend_commit: false - install_branch: "main" - keymap_patterns: "config/*.keymap" - json_path: "config" - config_path: "keymap_drawer.config.yaml" # config file, ignored if not exists - output_folder: "keymap-drawer" - destination: "both" - parse_args: "" # map of extra args to pass to `keymap parse`, e.g. "corne:'-l Def Lwr Rse' cradio:''" - draw_args: "" # map of extra args to pass to `keymap draw`, e.g. "corne:'-k corne_rotated' cradio:'-k paroxysm'" - diff --git a/.github/workflows/draw.yml b/.github/workflows/draw.yml new file mode 100644 index 000000000..3411ab01a --- /dev/null +++ b/.github/workflows/draw.yml @@ -0,0 +1,18 @@ +name: Draw Keymap +on: + workflow_dispatch: + push: + paths: + - "config/**" + - .github/workflows/draw.yml + - keymap_drawer.config.yaml + +jobs: + draw: + uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main + permissions: + contents: write + with: + commit_message: "[Draw] ${{ github.event.head_commit.message }}" + destination: "commit" + fail_on_error: ${{ fromJSON(true) }} diff --git a/README.md b/README.md index 77d175c3e..5bf76d056 100644 --- a/README.md +++ b/README.md @@ -2,5 +2,6 @@ if you need the 3D modle of this keyboard,you can connect me by Email。380 # 睫毛外设店 (Eyelash Peripherals) Corne - +## Keymap Diagram +![Diagram of config/eyelash_corne.keymap](keymap-drawer/eyelash_corne.svg "generated by @caksoylar's Keymap Drawer") diff --git a/keymap-drawer/corne.svg b/keymap-drawer/corne.svg deleted file mode 100644 index a6a862bec..000000000 --- a/keymap-drawer/corne.svg +++ /dev/null @@ -1,1336 +0,0 @@ - -/* start glyphs */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* end glyphs */ - - -default: - - - - - - - - - -Q - - - - -W - - - - -E - - - - -R - - - - -T - - - - - - - - - -Y - - - - -U - - - - -I - - - - -O - - - - -P - - - - - - - - - -&td0 - - - - -A - - - - -S - - - - -D - - - - -F - - - - -G - - - - - - - - - -H - - - - -J - - - - -K - - - - -L - - - - -; -: - - - - -' -" - - - - - - - - - -Z - - - - -X - - - - -C - - - - -V - - - - -B - - - - - - - - - -N - - - - -M - - - - -, -< - - - - -. -> - - - - -/ -? - - - - - - - - - - - - - - -LGUI - - - - - -lower - - - - - - -3 - - - - - - - - - - - -3 - - - - - -raise - - - - - - - - - - - - - - -lower: - - - - - - - - - -1 -! - - - - -2 -@ - - - - - -3 -# - - - - -4 -$ - - - - -5 -% - - - - - - - - - - -6 -^ - - - - -7 -& - - - - -8 -* - - - - -9 -( - - - - -0 -) - - - - - - - - - - - - - - - -BTCLRALL - - - - - -1 - - - - - -2 - - - - - - -3 - - - - - -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -HOME - - - - - -PGUP - - - - - - - - - - - -RGBOFF - - - - - - -RGBON - - - - - - - - - - - - - - - - -RGBEFF - - - - - - - - - - - - -RGBEFR - - - - - - -RGBSPI - - - - - - -RGBBRI - - - - - - -RGBBRD - - - - - -END - - - - - -PGDN - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -INS - - - - - - - - - - - - - - - - - - - -raise: - - - - - - - - - -! - - - - -@ - - - - -# - - - - -$ - - - - -% - - - - - - - - - - -^ - - - - -& - - - - -* - - - - -( - - - - -) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&mkpMB4 - - - - - - - - - - - -- -_ - - - - -= -+ - - - - -[ -{ - - - - -] -} - - - - -\ -| - - - - -` -~ - - - - - - - - - - -OUTUSB - - - - - - -OUTBLE - - - - - - - - - - - - - - - - -&mkpMB5 - - - - - - - - - - - -_ - - - - -+ - - - - -{ - - - - -} - - - - -| - - - - -~ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -3: - - - - - - - - - -F1 - - - - -F2 - - - - -F3 - - - - -F4 - - - - -F5 - - - - - - - - - - -F6 - - - - -F7 - - - - -F8 - - - - -F9 - - - - -F10 - - - - -F11 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&mkpMB4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -PRINTSCRE… - - - - -F12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -&mkpMB5 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -SCROLLLOCK - - - - - -PAUSEBREAK - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/keymap-drawer/corne.yaml b/keymap-drawer/corne.yaml deleted file mode 100644 index fac3be2ff..000000000 --- a/keymap-drawer/corne.yaml +++ /dev/null @@ -1,198 +0,0 @@ -layout: {qmk_keyboard: corne_rotated, qmk_layout: LAYOUT_split_3x6_3} -layers: - default: - - $$mdi:keyboard-tab$$ - - Q - - W - - E - - R - - T - - $$mdi:arrow-up-bold$$ - - Y - - U - - I - - O - - P - - {t: '$$mdi:backspace$$', type: backspace} - - '&td0' - - A - - S - - D - - F - - G - - $$mdi:arrow-down-bold$$ - - H - - J - - K - - L - - {t: ;, s: ':'} - - {t: '''', s: '"'} - - $$mdi:apple-keyboard-control$$ - - Z - - X - - C - - V - - B - - $$mdi:arrow-left-bold$$ - - N - - M - - {t: ',', s: <} - - {t: ., s: '>'} - - {t: /, s: '?'} - - $$mdi:keyboard-esc$$ - - $$mdi:keyboard-space$$ - - LGUI - - lower - - {t: '$$mdi:keyboard-space$$', h: '3'} - - $$mdi:arrow-right-bold$$ - - {t: '$$mdi:keyboard-return$$', h: '3'} - - raise - - $$mdi:apple-keyboard-option$$ - - {t: '$$mdi:keyboard-return$$', type: enter} - lower: - - {t: '$$mdi:transfer$$', type: trans} - - {t: '1', s: '!'} - - {t: '2', s: '@'} - - {t: '3', s: '#'} - - {t: '4', s: $} - - {t: '5', s: '%'} - - {t: '$$mdi:menu-up$$', s: '$$mdi:mouse$$'} - - {t: '6', s: ^} - - {t: '7', s: '&'} - - {t: '8', s: '*'} - - {t: '9', s: (} - - {t: '0', s: )} - - {t: '$$mdi:backspace$$', type: backspace} - - {t: '$$mdi:transfer$$', type: trans} - - BT CLR ALL - - {h: '1', s: '$$mdi:bluetooth-connect$$'} - - {h: '2', s: '$$mdi:bluetooth-connect$$'} - - {h: '3', s: '$$mdi:bluetooth-connect$$'} - - {h: '4', s: '$$mdi:bluetooth-connect$$'} - - {t: '$$mdi:menu-down$$', s: '$$mdi:mouse$$'} - - $$mdi:arrow-left-bold$$ - - $$mdi:arrow-down-bold$$ - - $$mdi:arrow-up-bold$$ - - $$mdi:arrow-right-bold$$ - - HOME - - PG UP - - {t: '$$mdi:transfer$$', type: trans} - - RGB OFF - - RGB ON - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - RGB EFF - - {t: '$$mdi:menu-left$$', s: '$$mdi:mouse$$'} - - RGB EFR - - RGB SPI - - RGB BRI - - RGB BRD - - END - - PG DN - - $$mdi:volume-off$$ - - {t: '$$mdi:transfer$$', type: trans} - - {type: held} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:menu-right$$', s: '$$mdi:mouse$$'} - - INS - - $$mdi:backspace-reverse-outline$$ - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:mouse-left-click-outline$$ - raise: - - {t: '$$mdi:transfer$$', type: trans} - - '!' - - '@' - - '#' - - $ - - '%' - - {t: '$$mdi:menu-up$$', s: '$$mdi:mouse$$'} - - ^ - - '&' - - '*' - - ( - - ) - - {t: '$$mdi:backspace$$', type: backspace} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:bluetooth-off$$ - - $$mdi:mouse-left-click-outline$$ - - $$mdi:mouse-scroll-wheel$$ - - $$mdi:mouse-right-click-outline$$ - - '&mkp MB4' - - {t: '$$mdi:menu-down$$', s: '$$mdi:mouse$$'} - - {t: '-', s: _} - - {t: '=', s: +} - - {t: '[', s: '{'} - - {t: ']', s: '}'} - - {t: \, s: '|'} - - {t: '`', s: '~'} - - {t: '$$mdi:transfer$$', type: trans} - - OUT USB - - OUT BLE - - {t: '$$mdi:minus-circle-outline$$', type: none} - - {t: '$$mdi:minus-circle-outline$$', type: none} - - '&mkp MB5' - - {t: '$$mdi:menu-left$$', s: '$$mdi:mouse$$'} - - _ - - + - - '{' - - '}' - - '|' - - '~' - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:keyboard-space$$ - - {t: '$$mdi:menu-right$$', s: '$$mdi:mouse$$'} - - {t: '$$mdi:keyboard-return$$', type: enter} - - {type: held} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:mouse-left-click-outline$$ - '3': - - {t: '$$mdi:transfer$$', type: trans} - - F1 - - F2 - - F3 - - F4 - - F5 - - {t: '$$mdi:menu-up$$', s: '$$mdi:mouse$$'} - - F6 - - F7 - - F8 - - F9 - - F10 - - F11 - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:mouse-left-click-outline$$ - - $$mdi:mouse-scroll-wheel$$ - - $$mdi:mouse-right-click-outline$$ - - '&mkp MB4' - - {t: '$$mdi:menu-down$$', s: '$$mdi:mouse$$'} - - $$mdi:progress-download$$ - - $$mdi:mouse-left-click-outline$$ - - $$mdi:mouse-scroll-wheel$$ - - $$mdi:mouse-right-click-outline$$ - - PRINTSCREEN - - F12 - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:backup-restore$$', type: bootloader} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:progress-download$$ - - {t: '$$mdi:transfer$$', type: trans} - - '&mkp MB5' - - {t: '$$mdi:menu-left$$', s: '$$mdi:mouse$$'} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:progress-download$$ - - {t: '$$mdi:backup-restore$$', type: bootloader} - - SCROLLLOCK - - PAUSE BREAK - - $$mdi:volume-off$$ - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {type: held} - - {t: '$$mdi:menu-right$$', s: '$$mdi:mouse$$'} - - {type: held alternate} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - $$mdi:mouse-left-click-outline$$ diff --git a/keymap-drawer/sofle.svg b/keymap-drawer/sofle.svg deleted file mode 100644 index e041e6b54..000000000 --- a/keymap-drawer/sofle.svg +++ /dev/null @@ -1,917 +0,0 @@ - -/* start glyphs */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/* end glyphs */ - - -Qwery: - - - - - - - - - -1 -! - - - - -2 -@ - - - - -3 -# - - - - -4 -$ - - - - -5 -% - - - - - - - - - -6 -^ - - - - -7 -& - - - - -8 -* - - - - -9 -( - - - - -0 -) - - - - -- -_ - - - - - - - - - -Q - - - - -W - - - - -E - - - - -R - - - - -T - - - - - - - - - -Y - - - - -U - - - - -I - - - - -O - - - - -P - - - - -] -} - - - - - - - - - -A - - - - -S - - - - -D - - - - -F - - - - -G - - - - - - - - - -H - - - - -J - - - - -K - - - - -L - - - - -; -: - - - - -. - - - - - - - - - -Z - - - - -X - - - - -C - - - - -V - - - - -B - - - - - - - - - -N - - - - -M - - - - -, -< - - - - -. -> - - - - -/ -? - - - - - - - - - - - - - - - - - - - - - - - - -LGUI - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -RGUI - - - - - - - - - - - - - - -Flash: - - - - -&flash_ma… - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/keymap-drawer/sofle.yaml b/keymap-drawer/sofle.yaml deleted file mode 100644 index 25e06c173..000000000 --- a/keymap-drawer/sofle.yaml +++ /dev/null @@ -1,132 +0,0 @@ -layout: {qmk_keyboard: corne/rev1} -layers: - Qwery: - - $$mdi:keyboard-esc$$ - - {t: '1', s: '!'} - - {t: '2', s: '@'} - - {t: '3', s: '#'} - - {t: '4', s: $} - - {t: '5', s: '%'} - - $$mdi:arrow-up-bold$$ - - {t: '6', s: ^} - - {t: '7', s: '&'} - - {t: '8', s: '*'} - - {t: '9', s: (} - - {t: '0', s: )} - - {t: '-', s: _} - - $$mdi:keyboard-tab$$ - - Q - - W - - E - - R - - T - - $$mdi:arrow-down-bold$$ - - Y - - U - - I - - O - - P - - {t: ']', s: '}'} - - $$mdi:apple-keyboard-caps$$ - - A - - S - - D - - F - - G - - $$mdi:arrow-left-bold$$ - - H - - J - - K - - L - - {t: ;, s: ':'} - - . - - $$mdi:apple-keyboard-shift$$ - - Z - - X - - C - - V - - B - - $$mdi:arrow-right-bold$$ - - N - - M - - {t: ',', s: <} - - {t: ., s: '>'} - - {t: /, s: '?'} - - {t: '$$mdi:keyboard-return$$', type: enter} - - {t: '$$mdi:backspace$$', type: backspace} - - $$mdi:apple-keyboard-control$$ - - $$mdi:apple-keyboard-option$$ - - LGUI - - $$mdi:keyboard-space$$ - - {t: '$$mdi:keyboard-return$$', type: enter} - - {t: '$$mdi:keyboard-return$$', type: enter} - - {t: '$$mdi:keyboard-return$$', type: enter} - - $$mdi:keyboard-space$$ - - RGUI - - $$mdi:apple-keyboard-option$$ - - $$mdi:apple-keyboard-control$$ - Flash: - - '&flash_macro' - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} - - {t: '$$mdi:transfer$$', type: trans} From b4cbee7de10151689331e71cdd66a5d76202053e Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:25:09 -0500 Subject: [PATCH 18/21] feat: physical layout --- .../eyelash_corne/eyelash_corne-layouts.dtsi | 68 +++++++++++++++++++ boards/arm/eyelash_corne/eyelash_corne.dtsi | 4 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 boards/arm/eyelash_corne/eyelash_corne-layouts.dtsi diff --git a/boards/arm/eyelash_corne/eyelash_corne-layouts.dtsi b/boards/arm/eyelash_corne/eyelash_corne-layouts.dtsi new file mode 100644 index 000000000..316630a3e --- /dev/null +++ b/boards/arm/eyelash_corne/eyelash_corne-layouts.dtsi @@ -0,0 +1,68 @@ +/* +* +* Copyright (c) 2024 The ZMK Contributors +* SPDX-License-Identifier: MIT +* +*/ + +#include + +/ { + default_layout: default_layout { + compatible = "zmk,physical-layout"; + display-name = "Layout"; + + transform = <&default_transform>; + + keys // w h x y rot rx r + = <&key_physical_attrs 100 100 0 37 0 0 0> + , <&key_physical_attrs 100 100 100 37 0 0 0> + , <&key_physical_attrs 100 100 200 12 0 0 0> + , <&key_physical_attrs 100 100 300 0 0 0 0> + , <&key_physical_attrs 100 100 400 12 0 0 0> + , <&key_physical_attrs 100 100 500 24 0 0 0> + , <&key_physical_attrs 100 100 925 24 0 0 0> + , <&key_physical_attrs 100 100 1150 24 0 0 0> + , <&key_physical_attrs 100 100 1250 12 0 0 0> + , <&key_physical_attrs 100 100 1350 0 0 0 0> + , <&key_physical_attrs 100 100 1450 12 0 0 0> + , <&key_physical_attrs 100 100 1550 37 0 0 0> + , <&key_physical_attrs 100 100 1650 37 0 0 0> + , <&key_physical_attrs 100 100 0 137 0 0 0> + , <&key_physical_attrs 100 100 100 137 0 0 0> + , <&key_physical_attrs 100 100 200 112 0 0 0> + , <&key_physical_attrs 100 100 300 100 0 0 0> + , <&key_physical_attrs 100 100 400 112 0 0 0> + , <&key_physical_attrs 100 100 500 124 0 0 0> + , <&key_physical_attrs 100 100 825 124 0 0 0> + , <&key_physical_attrs 100 100 925 124 0 0 0> + , <&key_physical_attrs 100 100 1025 124 0 0 0> + , <&key_physical_attrs 100 100 1150 124 0 0 0> + , <&key_physical_attrs 100 100 1250 112 0 0 0> + , <&key_physical_attrs 100 100 1350 100 0 0 0> + , <&key_physical_attrs 100 100 1450 112 0 0 0> + , <&key_physical_attrs 100 100 1550 137 0 0 0> + , <&key_physical_attrs 100 100 1650 137 0 0 0> + , <&key_physical_attrs 100 100 0 237 0 0 0> + , <&key_physical_attrs 100 100 100 237 0 0 0> + , <&key_physical_attrs 100 100 200 212 0 0 0> + , <&key_physical_attrs 100 100 300 200 0 0 0> + , <&key_physical_attrs 100 100 400 212 0 0 0> + , <&key_physical_attrs 100 100 500 224 0 0 0> + , <&key_physical_attrs 100 100 625 224 0 0 0> + , <&key_physical_attrs 100 100 925 224 0 0 0> + , <&key_physical_attrs 100 100 1150 224 0 0 0> + , <&key_physical_attrs 100 100 1250 212 0 0 0> + , <&key_physical_attrs 100 100 1350 200 0 0 0> + , <&key_physical_attrs 100 100 1450 212 0 0 0> + , <&key_physical_attrs 100 100 1550 237 0 0 0> + , <&key_physical_attrs 100 100 1650 237 0 0 0> + , <&key_physical_attrs 100 100 350 312 0 0 0> + , <&key_physical_attrs 100 100 450 312 1200 450 412> + , <&key_physical_attrs 100 100 550 312 2400 515 433> + , <&key_physical_attrs 100 100 1100 312 (-2400) 1230 433> + , <&key_physical_attrs 100 100 1200 312 (-1200) 1300 412> + , <&key_physical_attrs 100 100 1300 312 0 0 0> + ; + }; +}; diff --git a/boards/arm/eyelash_corne/eyelash_corne.dtsi b/boards/arm/eyelash_corne/eyelash_corne.dtsi index 3d00e3504..be2ebd125 100644 --- a/boards/arm/eyelash_corne/eyelash_corne.dtsi +++ b/boards/arm/eyelash_corne/eyelash_corne.dtsi @@ -10,6 +10,8 @@ #include #include +#include "eyelash_corne-layouts.dtsi" + / { model = "eyelash_corne"; compatible = "eyelashperipherals,eyelash_corne"; @@ -21,7 +23,7 @@ zmk,kscan = &kscan0; zmk,battery = &vbatt; zmk,underglow = &led_strip; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &default_layout; zmk,backlight = &backlight; }; From 40dcc19ee7db17dfe5ca53af8197341e73a91f61 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:32:57 -0500 Subject: [PATCH 19/21] feat: ZMK Studio build --- build.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build.yaml b/build.yaml index 95d4f4c63..b4c3fffef 100644 --- a/build.yaml +++ b/build.yaml @@ -6,6 +6,11 @@ include: - board: eyelash_corne_right shield: nice_view #snippet: zmk-usb-logging + - board: eyelash_corne_left + shield: nice_view + snippet: studio-rpc-usb-uart + cmake-args: -DCONFIG_ZMK_STUDIO=y + artifact-name: eyelash_corne_studio_left - board: eyelash_corne_left shield: settings_reset #snippet: zmk-usb-logging From 3ba7c4f028f2598d84e7cf648e334487a09664a4 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:38:36 -0500 Subject: [PATCH 20/21] docs: provide instructions --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5bf76d056..63328bd3b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,19 @@ -if you need the 3D modle of this keyboard,you can connect me by Email。380465425@qq.com -# 睫毛外设店 (Eyelash Peripherals) Corne +# 睫毛外设 (Eyelash Peripherals) Corne ZMK Repository +**This keyboard is not the same as [foostan's Corne](https://github.com/foostan/crkbd). It will not work with standard `corne` firmware.** + +![Photo of Eyelash Peripherals Corne](https://ae01.alicdn.com/kf/Sa797fee25edd44248fbfdb0e13d44e00B.jpg) + +If you need a 3D model of this keyboard, email `380465425@qq.com`. + +## Instructions + +1. [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository). +2. [Click the **Actions** tab and make sure the workflow is enabled](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow#enabling-a-workflow). +3. Make sure the `eyelash_corne` project in [`config/west.yml`](config/west.yml) still works. The `boards/arm/eyelash_corne` folder will be downloaded from this URL. +4. If there is still a `boards/arm/eyelash_corne` folder in your fork, delete it. + +**If you already have a ZMK config repository, [you can add this one as a module instead of forking](https://zmk.dev/docs/features/modules#building-with-modules).** ## Keymap Diagram From d95154c35be3cef524e6fce750c48db485ec0dd2 Mon Sep 17 00:00:00 2001 From: honorless <86894501+lesshonor@users.noreply.github.com> Date: Wed, 13 Nov 2024 19:19:35 -0500 Subject: [PATCH 21/21] feat: restore experimental mouse support --- README.md | 24 ++++++ boards/arm/eyelash_corne/eyelash_corne.keymap | 75 +++++++++++++++++++ config/eyelash_corne.conf | 2 +- config/eyelash_corne.keymap | 60 ++++++++++----- config/west.yml | 6 +- 5 files changed, 144 insertions(+), 23 deletions(-) create mode 100644 boards/arm/eyelash_corne/eyelash_corne.keymap diff --git a/README.md b/README.md index 63328bd3b..ad60fa091 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,27 @@ If you need a 3D model of this keyboard, email `380465425@qq.com`. ## Keymap Diagram ![Diagram of config/eyelash_corne.keymap](keymap-drawer/eyelash_corne.svg "generated by @caksoylar's Keymap Drawer") + +## Mouse Support + +:warning: This repository defaults to an EXPERIMENTAL mouse movement branch which is slated for eventual merge into ZMK, but is not guaranteed to be stable. For more information, see [beta testing](https://zmk.dev/docs/features/modules#beta-testing) and [PR #2477](https://github.com/zmkfirmware/zmk/pull/2477). + +If desired, edit your `config/west.yml` to switch back to `zmkfirmware`'s `main` branch: + +```diff +diff --git a/config/west.yml b/config/west.yml +index ac30a68..70ad540 100644 +--- a/config/west.yml ++++ b/config/west.yml +@@ -13,8 +13,8 @@ manifest: + url: https://github.com/a741725193/zmk-new_corne + revision: main + - name: zmk +- remote: petejohanson +- revision: feat/pointers-with-input-processors ++ remote: zmkfirmware ++ revision: main + import: app/west.yml + self: + path: config +``` diff --git a/boards/arm/eyelash_corne/eyelash_corne.keymap b/boards/arm/eyelash_corne/eyelash_corne.keymap new file mode 100644 index 000000000..1dfd78c51 --- /dev/null +++ b/boards/arm/eyelash_corne/eyelash_corne.keymap @@ -0,0 +1,75 @@ +#include +#include +#include +#include +#include +#include + +/ { + behaviors { + td0: td0 { + compatible = "zmk,behavior-tap-dance"; + #binding-cells = <0>; + bindings = <&kp LEFT_SHIFT>, <&kp CAPS>; + }; + }; + + rgb_encoder: rgb_encoder { + compatible = "zmk,behavior-sensor-rotate"; + #sensor-binding-cells = <0>; + bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; + }; + + keymap { + compatible = "zmk,keymap"; + + default_layer { + display-name = "QWERTY"; + + bindings = < +&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp UP &kp Y &kp U &kp I &kp O &kp P &kp BSPC +&td0 &kp A &kp S &kp D &kp F &kp G &kp LEFT &kp ENTER &kp RIGHT &kp H &kp J &kp K &kp L &kp SEMI &kp SQT +&kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp SPACE &kp DOWN &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC + &kp LGUI &mo 1 < 3 SPACE < 3 ENTER &mo 2 &kp RALT + >; + + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; + }; + + lower_layer { + display-name = "NUMBER"; + bindings = < +&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &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 &trans &mkp LCLK &trans &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 &kp C_MUTE &trans &rgb_ug RGB_EFR &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_BRD &kp END &kp PG_DN + &trans &trans &trans &kp INS &kp DEL &trans + >; + + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + }; + + raise_layer { + display-name = "SYMBOL"; + bindings = < +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &trans &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC +&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE +&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &kp C_MUTE &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &trans &trans &kp SPACE &kp RET &trans &trans + >; + + sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + }; + + layer_3 { + display-name = "Fn"; + bindings = < +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 +&trans &sys_reset &trans &bootloader &trans &mkp MB5 &kp C_MUTE &trans &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK + &trans &trans &trans &trans &trans &trans + >; + + sensor-bindings = <&rgb_encoder>; + }; + }; +}; diff --git a/config/eyelash_corne.conf b/config/eyelash_corne.conf index 384525153..097a728c5 100644 --- a/config/eyelash_corne.conf +++ b/config/eyelash_corne.conf @@ -22,7 +22,7 @@ CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3 CONFIG_EC11=y CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y -# Mouse clicks +# Mouse enable CONFIG_ZMK_MOUSE=y CONFIG_ZMK_BACKLIGHT=y diff --git a/config/eyelash_corne.keymap b/config/eyelash_corne.keymap index 1dfd78c51..caf85bb4c 100644 --- a/config/eyelash_corne.keymap +++ b/config/eyelash_corne.keymap @@ -5,10 +5,28 @@ #include #include +#include + +/* + + &mmv_input_listener { + input-processors = <&zip_xy_scaler 2 1>; + }; + + &msc_input_listener { + input-processors = <&zip_xy_scaler 2 1>; + }; + + */ + +#define ZMK_MOUSE_DEFAULT_MOVE_VAL 1200 // 600 +#define ZMK_MOUSE_DEFAULT_SCRL_VAL 20 // 10 + / { behaviors { td0: td0 { compatible = "zmk,behavior-tap-dance"; + display-name = "Shift/Caps Lock Tap Dance"; #binding-cells = <0>; bindings = <&kp LEFT_SHIFT>, <&kp CAPS>; }; @@ -20,56 +38,58 @@ bindings = <&rgb_ug RGB_BRI>, <&rgb_ug RGB_BRD>; }; + scroll_encoder: scroll_encoder { + compatible = "zmk,behavior-sensor-rotate"; + #sensor-binding-cells = <0>; + bindings = <&msc SCRL_DOWN>, <&msc SCRL_UP>; + tap-ms = <30>; + }; + keymap { compatible = "zmk,keymap"; default_layer { display-name = "QWERTY"; - bindings = < &kp TAB &kp Q &kp W &kp E &kp R &kp T &kp UP &kp Y &kp U &kp I &kp O &kp P &kp BSPC &td0 &kp A &kp S &kp D &kp F &kp G &kp LEFT &kp ENTER &kp RIGHT &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp LCTRL &kp Z &kp X &kp C &kp V &kp B &kp SPACE &kp DOWN &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC &kp LGUI &mo 1 < 3 SPACE < 3 ENTER &mo 2 &kp RALT >; - sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOLUME_DOWN>; }; lower_layer { display-name = "NUMBER"; bindings = < -&trans &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &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 &trans &mkp LCLK &trans &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 &kp C_MUTE &trans &rgb_ug RGB_EFR &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_BRD &kp END &kp PG_DN - &trans &trans &trans &kp INS &kp DEL &trans +&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 +&trans &bt BT_CLR_ALL &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &mmv MOVE_LEFT &mkp LCLK &mmv MOVE_RIGHT &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 &kp C_MUTE &mmv MOVE_DOWN &rgb_ug RGB_EFR &rgb_ug RGB_SPI &rgb_ug RGB_BRI &rgb_ug RGB_BRD &kp END &kp PG_DN + &trans &trans &trans &kp INS &kp DEL &trans >; - - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&scroll_encoder>; }; raise_layer { display-name = "SYMBOL"; bindings = < -&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &trans &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC -&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE -&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &kp C_MUTE &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &trans &trans &kp SPACE &kp RET &trans &trans +&trans &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &mmv MOVE_UP &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC +&trans &bt BT_CLR &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &mmv MOVE_LEFT &mkp LCLK &mmv MOVE_RIGHT &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE +&trans &out OUT_USB &out OUT_BLE &none &none &mkp MB5 &trans &mmv MOVE_DOWN &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE + &trans &trans &kp SPACE &kp RET &trans &trans >; - - sensor-bindings = <&inc_dec_kp PG_UP PG_DN>; + sensor-bindings = <&scroll_encoder>; }; layer_3 { display-name = "Fn"; bindings = < -&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &trans &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 -&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &trans &mkp LCLK &trans &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 -&trans &sys_reset &trans &bootloader &trans &mkp MB5 &kp C_MUTE &trans &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK - &trans &trans &trans &trans &trans &trans +&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &mmv MOVE_UP &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 +&trans &trans &mkp LCLK &mkp MCLK &mkp RCLK &mkp MB4 &mmv MOVE_LEFT &mkp LCLK &mmv MOVE_RIGHT &bootloader &mkp LCLK &mkp MCLK &mkp RCLK &kp PRINTSCREEN &kp F12 +&trans &sys_reset &trans &bootloader &trans &mkp MB5 &kp C_MUTE &mmv MOVE_DOWN &trans &trans &bootloader &sys_reset &kp SCROLLLOCK &kp PAUSE_BREAK + &trans &trans &trans &trans &trans &trans >; - - sensor-bindings = <&rgb_encoder>; + sensor-bindings = <&scroll_encoder>; }; }; }; diff --git a/config/west.yml b/config/west.yml index eeff17912..ac30a68c3 100644 --- a/config/west.yml +++ b/config/west.yml @@ -6,13 +6,15 @@ manifest: # See: # - https://zmk.dev/docs/features/modules # - https://docs.zephyrproject.org/3.5.0/develop/west/manifest.html#projects + - name: petejohanson + url-base: https://github.com/petejohanson projects: - name: eyelash_corne url: https://github.com/a741725193/zmk-new_corne revision: main - name: zmk - remote: zmkfirmware - revision: main + remote: petejohanson + revision: feat/pointers-with-input-processors import: app/west.yml self: path: config