From 0dcb541f7120a4d6d343a2bd6329d3c048acfff5 Mon Sep 17 00:00:00 2001 From: Chen Zeng Date: Sun, 21 Jul 2024 11:22:32 +0800 Subject: [PATCH] inital corne configuration --- .github/workflows/build.yml | 26 + .gitignore | 6 + README.md | 5 + build.yaml | 11 + config/Kconfig | 10 + config/boards/arm/sofle/Kconfig.board | 15 + config/boards/arm/sofle/Kconfig.defconfig | 70 ++ config/boards/arm/sofle/board.cmake | 6 + config/boards/arm/sofle/corne.conf | 23 + config/boards/arm/sofle/corne.dtsi | 189 ++++ config/boards/arm/sofle/corne.yaml | 20 + config/boards/arm/sofle/corne.zmk.yml | 15 + config/boards/arm/sofle/corne_left.dts | 55 ++ config/boards/arm/sofle/corne_left_defconfig | 77 ++ config/boards/arm/sofle/corne_right.dts | 76 ++ config/boards/arm/sofle/corne_right_defconfig | 74 ++ .../nice_view_adapter/Kconfig.defconfig | 0 .../shields/nice_view_adapter/Kconfig.shield | 2 + .../boards/sofle_left.overlay | 29 + .../boards/sofle_right.overlay | 29 + .../nice_view_adapter/nice_view_adapter.conf | 5 + .../nice_view_adapter.overlay | 0 .../nice_view_adapter.zmk.yml | 7 + config/corne.conf | 28 + config/corne.json | 73 ++ config/corne.keymap | 150 +++ config/west.yml | 11 + keymap-drawer/sofle.svg | 917 ++++++++++++++++++ keymap-drawer/sofle.yaml | 132 +++ keymap_drawer.config.yaml | 558 +++++++++++ 30 files changed, 2619 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 build.yaml create mode 100644 config/Kconfig create mode 100644 config/boards/arm/sofle/Kconfig.board create mode 100644 config/boards/arm/sofle/Kconfig.defconfig create mode 100644 config/boards/arm/sofle/board.cmake create mode 100644 config/boards/arm/sofle/corne.conf create mode 100644 config/boards/arm/sofle/corne.dtsi create mode 100644 config/boards/arm/sofle/corne.yaml create mode 100644 config/boards/arm/sofle/corne.zmk.yml create mode 100644 config/boards/arm/sofle/corne_left.dts create mode 100644 config/boards/arm/sofle/corne_left_defconfig create mode 100644 config/boards/arm/sofle/corne_right.dts create mode 100644 config/boards/arm/sofle/corne_right_defconfig create mode 100644 config/boards/shields/nice_view_adapter/Kconfig.defconfig create mode 100644 config/boards/shields/nice_view_adapter/Kconfig.shield create mode 100644 config/boards/shields/nice_view_adapter/boards/sofle_left.overlay create mode 100644 config/boards/shields/nice_view_adapter/boards/sofle_right.overlay create mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.conf create mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.overlay create mode 100644 config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml create mode 100644 config/corne.conf create mode 100644 config/corne.json create mode 100644 config/corne.keymap create mode 100644 config/west.yml create mode 100644 keymap-drawer/sofle.svg create mode 100644 keymap-drawer/sofle.yaml create mode 100644 keymap_drawer.config.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..932dbb8 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build ZMK firmware +on: + workflow_dispatch: + push: + paths: + - "config/**" + +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/.gitignore b/.gitignore new file mode 100644 index 0000000..36f5dd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build/ +zmk/ +zephyr/ +modules/ +tools/ +.west/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1fc010d --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# zmk-config-corne + + + + diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..36b7245 --- /dev/null +++ b/build.yaml @@ -0,0 +1,11 @@ +include: + - board: corne_left + - board: corne_right + - board: nice_nano_v2 + shield: settings_reset + - board: corne_left + shield: nice_view_adapter nice_view + artifact-name: corne_left_nice_view + - board: corne_right + shield: nice_view_adapter nice_view + artifact-name: corne_right_nice_view diff --git a/config/Kconfig b/config/Kconfig new file mode 100644 index 0000000..11f09ea --- /dev/null +++ b/config/Kconfig @@ -0,0 +1,10 @@ +# +# 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/sofle/Kconfig.board b/config/boards/arm/sofle/Kconfig.board new file mode 100644 index 0000000..8886156 --- /dev/null +++ b/config/boards/arm/sofle/Kconfig.board @@ -0,0 +1,15 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +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/sofle/Kconfig.defconfig b/config/boards/arm/sofle/Kconfig.defconfig new file mode 100644 index 0000000..1caf850 --- /dev/null +++ b/config/boards/arm/sofle/Kconfig.defconfig @@ -0,0 +1,70 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +if BOARD_CORNE_LEFT + +config ZMK_KEYBOARD_NAME + default "Corne" + +config ZMK_SPLIT_ROLE_CENTRAL + default y + +endif # BOARD_CORNE_LEFT + + +if BOARD_CORNE_LEFT || BOARD_CORNE_RIGHT + +config BOARD + default "corne" + +config ZMK_SPLIT + default y + +config BT_CTLR + default BT + +if USB + +config USB_NRFX + default y + +config USB_DEVICE_STACK + default y + +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 LVGL + +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 + diff --git a/config/boards/arm/sofle/board.cmake b/config/boards/arm/sofle/board.cmake new file mode 100644 index 0000000..ccc9c43 --- /dev/null +++ b/config/boards/arm/sofle/board.cmake @@ -0,0 +1,6 @@ +# Copyright (c) 2021 @MangoIV +# SPDX-License-Identifier: MIT + +board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") +include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) +include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) diff --git a/config/boards/arm/sofle/corne.conf b/config/boards/arm/sofle/corne.conf new file mode 100644 index 0000000..eb7d126 --- /dev/null +++ b/config/boards/arm/sofle/corne.conf @@ -0,0 +1,23 @@ +# 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 diff --git a/config/boards/arm/sofle/corne.dtsi b/config/boards/arm/sofle/corne.dtsi new file mode 100644 index 0000000..80435dd --- /dev/null +++ b/config/boards/arm/sofle/corne.dtsi @@ -0,0 +1,189 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +/dts-v1/; +#include +#include +#include + +/ { + model = "corne"; + compatible = "corne"; + + chosen { + zephyr,code-partition = &code_partition; + 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; + }; + + left_encoder: encoder_left { + compatible = "alps,ec11"; + label = "LEFT_ENCODER"; + resolution = <4>; + status = "disabled"; + }; + + sensors { + compatible = "zmk,keymap-sensors"; + sensors = <&left_encoder>; + }; + + 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,3) RC(3,4) RC(3,5) RC(3,7) RC(3,8) RC(3,9) RC(2,10) + RC(4,2) RC(4,7) + >; + }; +}; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + }; +}; + +&flash0 { + /* + * For more information, see: + * http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + sd_partition: partition@0 { + reg = <0x00000000 0x00026000>; + }; + code_partition: partition@26000 { + reg = <0x00026000 0x000c6000>; + }; + + /* + * 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. + */ + storage_partition: partition@ec000 { + reg = <0x000ec000 0x00008000>; + }; + + boot_partition: partition@f4000 { + reg = <0x000f4000 0x0000c000>; + }; + }; +}; + +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; + + spi3_default: spi3_default { + group1 { + psels = ; // WS2812_VEXT_DATA + }; + }; + + spi3_sleep: spi3_sleep { + group1 { + psels = ; + low-power-enable; + }; + }; +}; + +&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>; + }; +}; + +&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 = <6>; + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + + color-mapping = ; + }; +}; \ No newline at end of file diff --git a/config/boards/arm/sofle/corne.yaml b/config/boards/arm/sofle/corne.yaml new file mode 100644 index 0000000..a98a8b8 --- /dev/null +++ b/config/boards/arm/sofle/corne.yaml @@ -0,0 +1,20 @@ +identifier: corne +name: Solfe +url: https://github.com/tokyo2006/zmk-config-corne +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +ram: 40 +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog + - gpio + - i2c + - spi \ No newline at end of file diff --git a/config/boards/arm/sofle/corne.zmk.yml b/config/boards/arm/sofle/corne.zmk.yml new file mode 100644 index 0000000..090232d --- /dev/null +++ b/config/boards/arm/sofle/corne.zmk.yml @@ -0,0 +1,15 @@ +file_format: "1" +id: corne +name: Sofle +url: https://github.com/tokyo2006/zmk-config-corne +type: board +arch: arm +features: + - keys + - display +outputs: + - usb + - ble +siblings: + - corne_left + - corne_right \ No newline at end of file diff --git a/config/boards/arm/sofle/corne_left.dts b/config/boards/arm/sofle/corne_left.dts new file mode 100644 index 0000000..6712a34 --- /dev/null +++ b/config/boards/arm/sofle/corne_left.dts @@ -0,0 +1,55 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ + +#include "corne.dtsi" + +/{ + chosen { + zmk,battery = &vbatt; + + }; + + 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> + ; + }; + + 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 { + a-gpios = <&gpio1 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + b-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; + status = "okay"; +}; \ No newline at end of file diff --git a/config/boards/arm/sofle/corne_left_defconfig b/config/boards/arm/sofle/corne_left_defconfig new file mode 100644 index 0000000..51e63b1 --- /dev/null +++ b/config/boards/arm/sofle/corne_left_defconfig @@ -0,0 +1,77 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_CORNE_LEFT=y +CONFIG_ZMK_SLEEP=y + + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI +CONFIG_SPI=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +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 + +# 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 + +#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/sofle/corne_right.dts b/config/boards/arm/sofle/corne_right.dts new file mode 100644 index 0000000..142aa1c --- /dev/null +++ b/config/boards/arm/sofle/corne_right.dts @@ -0,0 +1,76 @@ +/* +* +* Copyright (c) 2021 Darryl deHaan +* SPDX-License-Identifier: MIT +* +*/ +#include "corne.dtsi" + +/{ + chosen { + zmk,battery = &vbatt; + }; + + 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> + ; + }; + + 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 { + 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 = ; + }; +}; \ No newline at end of file diff --git a/config/boards/arm/sofle/corne_right_defconfig b/config/boards/arm/sofle/corne_right_defconfig new file mode 100644 index 0000000..3687c87 --- /dev/null +++ b/config/boards/arm/sofle/corne_right_defconfig @@ -0,0 +1,74 @@ +# +# Copyright (c) 2022 Darryl deHaan +# SPDX-License-Identifier: MIT +# + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_CORNE_RIGHT=y +CONFIG_ZMK_SLEEP=y + + +# Enable MPU +CONFIG_ARM_MPU=y + +# enable pinctrl +CONFIG_PINCTRL=y + +# enable GPIO +CONFIG_GPIO=y + +# Enable SPI +CONFIG_SPI=y + +# Enable writing to flash +CONFIG_USE_DT_CODE_PARTITION=y +CONFIG_BUILD_OUTPUT_UF2=y +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +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 + +# 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 + +#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 + + diff --git a/config/boards/shields/nice_view_adapter/Kconfig.defconfig b/config/boards/shields/nice_view_adapter/Kconfig.defconfig new file mode 100644 index 0000000..e69de29 diff --git a/config/boards/shields/nice_view_adapter/Kconfig.shield b/config/boards/shields/nice_view_adapter/Kconfig.shield new file mode 100644 index 0000000..e465bd0 --- /dev/null +++ b/config/boards/shields/nice_view_adapter/Kconfig.shield @@ -0,0 +1,2 @@ +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/sofle_left.overlay b/config/boards/shields/nice_view_adapter/boards/sofle_left.overlay new file mode 100644 index 0000000..982bc32 --- /dev/null +++ b/config/boards/shields/nice_view_adapter/boards/sofle_left.overlay @@ -0,0 +1,29 @@ +&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/sofle_right.overlay b/config/boards/shields/nice_view_adapter/boards/sofle_right.overlay new file mode 100644 index 0000000..982bc32 --- /dev/null +++ b/config/boards/shields/nice_view_adapter/boards/sofle_right.overlay @@ -0,0 +1,29 @@ +&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 new file mode 100644 index 0000000..36c8ded --- /dev/null +++ b/config/boards/shields/nice_view_adapter/nice_view_adapter.conf @@ -0,0 +1,5 @@ +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 \ 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 new file mode 100644 index 0000000..e69de29 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 new file mode 100644 index 0000000..3d44235 --- /dev/null +++ b/config/boards/shields/nice_view_adapter/nice_view_adapter.zmk.yml @@ -0,0 +1,7 @@ +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 diff --git a/config/corne.conf b/config/corne.conf new file mode 100644 index 0000000..2da6771 --- /dev/null +++ b/config/corne.conf @@ -0,0 +1,28 @@ +# 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=n +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 + +#EC11 enable +CONFIG_EC11=y +CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y \ No newline at end of file diff --git a/config/corne.json b/config/corne.json new file mode 100644 index 0000000..4aeee11 --- /dev/null +++ b/config/corne.json @@ -0,0 +1,73 @@ +{ + "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": 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" }, + + { "row": 4, "col": 2, "x": 8, "y": 3.5, "label": "4\n2" }, + { "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 diff --git a/config/corne.keymap b/config/corne.keymap new file mode 100644 index 0000000..d498e1b --- /dev/null +++ b/config/corne.keymap @@ -0,0 +1,150 @@ +#include +#include +#include +#include +#include +#include + + +/ { + macros { + flash_macro: flash_macro { + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + bindings = <&bootloader>; + }; + layer_s: layer_s { + label = "layer shift color"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + wait-ms = <0>; + tap-ms = <0>; + bindings = + <¯o_press>, + <&kp LSHFT>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(35,100,50)>, + <¯o_pause_for_release>, + <¯o_release>, + <&kp LSHFT>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(240,50,30)>; + }; + + layer_1: layer_1 { + label = "layer 1"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + wait-ms = <0>; + tap-ms = <0>; + bindings = + <¯o_press>, + << 1 END>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(300,100,50)>, + <¯o_pause_for_release>, + <¯o_release>, + << 1 END>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(240,50,30)>; + }; + + layer_2: layer_2 { + label = "layer 2"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + wait-ms = <0>; + tap-ms = <0>; + bindings = + <¯o_press>, + <&mo 2>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(175,100,50)>, + <¯o_pause_for_release>, + <¯o_release>, + <&mo 2>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(240,50,30)>; + }; + + layer_3: layer_3 { + label = "layer 3"; + compatible = "zmk,behavior-macro"; + #binding-cells = <0>; + wait-ms = <0>; + tap-ms = <0>; + bindings = + <¯o_press>, + << 3 DEL>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(0,100,50)>, + <¯o_pause_for_release>, + <¯o_release>, + << 3 DEL>, + <¯o_tap>, + <&rgb_ug RGB_COLOR_HSB(240,50,30)>; + }; + }; + + behaviors { + hm: homerow_mods { + compatible = "zmk,behavior-hold-tap"; + label = "HOMEROW_MODS"; + bindings = <&kp>, <&kp>; + + #binding-cells = <2>; + tapping-term-ms = <200>; + quick-tap-ms = <180>; + flavor = "tap-preferred"; + }; + + ltq: ltq { + compatible = "zmk,behavior-hold-tap"; + label = "LTQ"; + bindings = <&mo>, <&kp>; + + #binding-cells = <2>; + tapping-term-ms = <200>; + quick-tap-ms = <180>; + }; + + as: auto_shift { + compatible = "zmk,behavior-hold-tap"; + label = "AUTO_SHIFT"; + bindings = <&kp>, <&kp>; + + #binding-cells = <2>; + tapping-term-ms = <135>; + quick-tap-ms = <0>; + }; + }; + + keymap { + compatible = "zmk,keymap"; + + Qwery { + bindings = < +&rgb_ug RGB_TOG &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp UP_ARROW &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS +&ext_power EP_ON &kp Q &kp W &kp E &kp R &kp T &kp DOWN_ARROW &kp Y &kp U &kp I &kp O &kp P &kp RBKT +&ext_power EP_OFF &kp A &kp S &kp D &kp F &kp G &kp LEFT_ARROW &kp H &kp J &kp K &kp L &kp SEMI &kp APOS +&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp RIGHT_ARROW &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ENTER +&kp BSPC &kp LCTRL &kp LALT &kp LGUI &kp SPACE &kp ENTER &kp ENTER &kp ENTER &kp SPACE &kp RGUI &kp RALT &kp RCTRL + >; + + sensor-bindings = <&inc_dec_kp C_VOLUME_UP C_VOL_DN>; + display-name = "Qwery"; + }; + + Flash { + bindings = < +&flash_macro &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans +&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + >; + + display-name = "Flash"; + }; + }; +}; \ No newline at end of file diff --git a/config/west.yml b/config/west.yml new file mode 100644 index 0000000..379d291 --- /dev/null +++ b/config/west.yml @@ -0,0 +1,11 @@ +manifest: + remotes: + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + projects: + - name: zmk + remote: zmkfirmware + revision: main + import: app/west.yml + self: + path: config diff --git a/keymap-drawer/sofle.svg b/keymap-drawer/sofle.svg new file mode 100644 index 0000000..e041e6b --- /dev/null +++ b/keymap-drawer/sofle.svg @@ -0,0 +1,917 @@ + +/* 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 new file mode 100644 index 0000000..25e06c1 --- /dev/null +++ b/keymap-drawer/sofle.yaml @@ -0,0 +1,132 @@ +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} diff --git a/keymap_drawer.config.yaml b/keymap_drawer.config.yaml new file mode 100644 index 0000000..1ba113c --- /dev/null +++ b/keymap_drawer.config.yaml @@ -0,0 +1,558 @@ +draw_config: + n_columns: 1 + draw_key_sides: true + key_w: 60.0 + key_h: 56.0 + split_gap: 30.0 + combo_w: 28.0 + combo_h: 26.0 + key_rx: 6.0 + key_ry: 6.0 + inner_pad_w: 2.0 + inner_pad_h: 2.0 + outer_pad_w: 40.0 + outer_pad_h: 56.0 + line_spacing: 1.2 + arc_radius: 6.0 + append_colon_to_layer_header: true + small_pad: 2.0 + svg_extra_style: | + /* For default sytles, see https://github.com/caksoylar/keymap-drawer/blob/main/keymap_drawer/config.py#L85 */ + + svg.keymap { + font-family: Ubuntu Mono, Inconsolata, Consolas, Liberation Mono, Menlo, monospace; + font-size: 12px; + font-weight: bold; + text-rendering: optimizeLegibility; + } + + /* Color accent for held keys */ + rect.held, rect.combo.held { + fill: #ffc; + } + + /* Technique borrowed and extended from https://github.com/englmaxi/zmk-config/blob/master/keymap-drawer/config.yaml */ + .sym_sub_text.tap { + translate: -5px 2px; + font-size: 20px; + } + .sym_sub_text.shifted { + translate: 10px 13px; + font-size: 10px; + opacity: 1.0; + } + .combo.sym_sub_text.tap { + translate: -1px 1px; + } + .combo.sym_sub_text.shifted { + translate: 7px 5px; + font-size: 10px; + opacity: 1.0; + } + + /* Toggle */ + .toggle.shifted { + translate: -10px 12px; + } + + .toggle.hold { + translate: 13px -23px; + } + + /* Variant for tap-dances */ + .tap_dance.tap { + translate: -7px 0px; + font-size: 12px; + } + .tap_dance.shifted { + translate: 7px 17px; + font-size: 12px; + opacity: 1.0; + } + + /* Variant for symbol next to symbol */ + .sym_by_sym.tap { + translate: -6px 0px; + } + .sym_by_sym.shifted { + translate: 10px 12px; + opacity: 1.0; + } + + .combo.sym_by_sym.tap { + translate: -35px 0px; + } + .combo.sym_by_sym.shifted { + translate: 35px 20px; + opacity: 1.0; + } + + .combo.sym_by_sym.hold { + visibility: hidden; + } + + /* hide hold box for combo sym_by_sym */ + .combo.sym_by_sym.hold > path[stroke="none"][fill="none"] { + visibility: hidden; + } + + shrink_wide_legends: 6 + glyph_tap_size: 18 + glyph_hold_size: 15 + glyph_shifted_size: 15 + glyphs: {} + glyph_urls: + tabler: https://unpkg.com/@tabler/icons/icons/outline/{}.svg + tablerf: https://unpkg.com/@tabler/icons/icons/filled/{}.svg + mdi: https://raw.githubusercontent.com/Templarian/MaterialDesign-SVG/master/svg/{}.svg + mdil: https://raw.githubusercontent.com/Pictogrammers/MaterialDesignLight/master/svg/{}.svg + material: https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/{}/default/48px.svg + use_local_cache: true + +parse_config: + mark_alternate_layer_activators: true + sticky_label: $$mdi:gesture-tap-hold$$ + trans_legend: + tap: $$mdi:transfer$$ + type: trans + + raw_binding_map: + # Layers + "<q 1 BACKSPACE": + tap: $$mdi:backspace$$ + hold: '$$mdi:navigation-variant$$' + "<q 3 TAB": + tap: $$mdi:keyboard-tab$$ + hold: $$mdi:numeric$$ + "<q 2 SPACE": + tap: $$mdi:keyboard-space$$ + hold: $$mdi:symbol$$ + "<q 3 ENTER": + tap: $$mdi:keyboard-return$$ + hold: $$mdi:numeric$$ + "<q 1 DELETE": + tap: $$mdi:backspace-reverse-outline$$ + hold: $$mdi:navigation-variant$$ + # Home rows + "&hm LEFT_GUI A": + tap: 'A' + shifted: $$mdi:apple-keyboard-command$$ + "&hm LEFT_ALT S": + tap: 'S' + shifted: $$mdi:apple-keyboard-option$$ + "&hm LEFT_CONTROL D": + tap: 'D' + shifted: $$mdi:apple-keyboard-control$$ + "&hm LEFT_SHIFT F": + tap: 'F' + shifted: $$mdi:apple-keyboard-shift$$ + "&hm RIGHT_SHIFT J": + tap: 'J' + shifted: $$mdi:apple-keyboard-shift$$ + "&hm RIGHT_CONTROL K": + tap: 'K' + shifted: $$mdi:apple-keyboard-control$$ + "&hm RIGHT_ALT L": + tap: 'L' + shifted: $$mdi:apple-keyboard-option$$ + # self behaviors + "&hm LG(LS(V)) P": + tap: 'P' + shifted: $$mdi:content-copy$$ + # Mouse + "&msc SCRL_UP": + tap: $$mdi:pan-up$$ + hold: '' + shifted: '' + "&msc SCRL_DOWN": + tap: $$mdi:pan-down$$ + hold: '' + shifted: '' + "&msc SCRL_LEFT": + tap: $$mdi:pan-left$$ + hold: '' + shifted: '' + "&msc SCRL_RIGHT": + tap: $$mdi:pan-right$$ + hold: '' + shifted: '' + "&mmv MOVE_LEFT": + tap: $$mdi:menu-left$$ + hold: '' + shifted: $$mdi:mouse$$ + "&mmv MOVE_RIGHT": + tap: $$mdi:menu-right$$ + hold: '' + shifted: $$mdi:mouse$$ + "&mmv MOVE_UP": + tap: $$mdi:menu-up$$ + hold: '' + shifted: $$mdi:mouse$$ + "&mmv MOVE_DOWN": + tap: $$mdi:menu-down$$ + hold: '' + shifted: $$mdi:mouse$$ + "&mkp LCLK": + tap: $$mdi:mouse-left-click-outline$$ + "&mkp RCLK": + tap: $$mdi:mouse-right-click-outline$$ + "&mkp MCLK": + tap: $$mdi:mouse-scroll-wheel$$ + # Modifiers + "&caps_word": $$mdi:alpha-w-box$$ + "&kt RSHIFT": + tap: $$mdi:apple-keyboard-shift$$ + hold: $$mdi:toggle-switch$$ + + # Empty + "&none": + tap: $$mdi:minus-circle-outline$$ + type: none + + # Whitespace + "&bkspc_del": + type: backspace + tap: $$mdi:backspace$$ + shifted: $$mdi:backspace-reverse-outline$$ + + # Bluetooth + "&bt BT_SEL 0": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: 1 + "&bt BT_SEL 1": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: 2 + "&bt BT_SEL 2": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: 3 + "&bt BT_SEL 3": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: 4 + "&bt BT_SEL 4": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: 5 + "&out OUT_TOG": + shifted: $$mdi:usb$$ + tap: $$mdi:toggle-switch$$ + hold: $$mdi:bluetooth$$ + "&bt BT_PRV": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: $$mdi:arrow-up-bold$$ + "&bt BT_NXT": + shifted: $$mdi:bluetooth-connect$$ + tap: "" + hold: $$mdi:arrow-down-bold$$ + # Reset + "&sys_reset": + type: bootloader + tap: $$mdi:backup-restore$$ + "&bootloader": + tap: $$mdi:progress-download$$ + + # ZMK + zmk_keycode_map: + # Symbols + EXCLAMATION: "!" + EXCL: "!" + AT_SIGN: "@" + AT: "@" + HASH: "#" + POUND: "#" + DOLLAR: $ + DLLR: $ + PERCENT: "%" + PRCNT: "%" + CARET: ^ + AMPERSAND: "&" + AMPS: "&" + ASTERISK: "*" + ASTRK: "*" + STAR: "*" + LEFT_PARENTHESIS: ( + LPAR: ( + RIGHT_PARENTHESIS: ) + RPAR: ) + EQUAL: + tap: "=" + shifted: "+" + PLUS: + + MINUS: + tap: "-" + shifted: "_" + UNDERSCORE: _ + UNDER: _ + SLASH: + tap: "/" + shifted: "?" + FSLH: + tap: "/" + shifted: "?" + QUESTION: "?" + QMARK: "?" + BACKSLASH: + tap: '\' + shifted: "|" + BSLH: + tap: '\' + shifted: "|" + PIPE: "|" + NON_US_BACKSLASH: \ + PIPE2: "|" + NON_US_BSLH: "|" + SEMICOLON: + tap: ";" + shifted: ":" + SEMI: + tap: ";" + shifted: ":" + COLON: ":" + SINGLE_QUOTE: + tap: "'" + shifted: '"' + SQT: + tap: "'" + shifted: '"' + APOSTROPHE: < + APOS: . + DOUBLE_QUOTES: '"' + DQT: '"' + + LESS_THAN: < + LT: < + PERIOD: '.' + DOT: + tap: "." + shifted: ">" + COMMA: + tap: "," + shifted: "<" + GREATER_THAN: ">" + GT: ">" + LEFT_BRACKET: + tap: "[" + shifted: "{" + LBKT: + tap: "[" + shifted: "{" + LEFT_BRACE: "{" + LBRC: "{" + RIGHT_BRACKET: + tap: "]" + shifted: "}" + RBKT: + tap: "]" + shifted: "}" + RIGHT_BRACE: "}" + RBRC: "}" + GRAVE: + tap: "`" + shifted: "~" + TILDE: "~" + NON_US_HASH: "#" + NUHS: "#" + TILDE2: "~" + + # Numbers + N1: + tap: 1 + shifted: "!" + N2: + tap: 2 + shifted: "@" + N3: + tap: 3 + shifted: "#" + N4: + tap: 4 + shifted: "$" + N5: + tap: 5 + shifted: "%" + N6: + tap: 6 + shifted: "^" + N7: + tap: 7 + shifted: "&" + N8: + tap: 8 + shifted: "*" + N9: + tap: 9 + shifted: "(" + N0: + tap: 0 + shifted: ")" + + # Modifiers + LCTRL: $$mdi:apple-keyboard-control$$ + LEFT_CONTROL: $$mdi:apple-keyboard-control$$ + LALT: $$mdi:apple-keyboard-option$$ + LEFT_ALT: $$mdi:apple-keyboard-option$$ + LSHIFT: $$mdi:apple-keyboard-shift$$ + LEFT_SHIFT: $$mdi:apple-keyboard-shift$$ + LSHFT: $$mdi:apple-keyboard-shift$$ + LCMD: $$mdi:apple-keyboard-command$$ + LG: $$mdi:apple-keyboard-command$$ + LEFT_GUI: $$mdi:apple-keyboard-command$$ + LEFT_COMMAND: $$mdi:apple-keyboard-command$$ + RCTRL: $$mdi:apple-keyboard-control$$ + RIGHT_CONTROL: $$mdi:apple-keyboard-control$$ + RALT: $$mdi:apple-keyboard-option$$ + RIGHT_ALT: $$mdi:apple-keyboard-option$$ + RSHIFT: $$mdi:apple-keyboard-shift$$ + RIGHT_SHIFT: $$mdi:apple-keyboard-shift$$ + RSHFT: $$mdi:apple-keyboard-shift$$ + RCMD: $$mdi:apple-keyboard-command$$ + RG: $$mdi:apple-keyboard-command$$ + PSCRN: $$mdi:printer-outline$$ + RIGHT_COMMAND: $$mdi:apple-keyboard-command$$ + PAGE_UP: + tap: 'PgUp' + shifted: '' + PAGE_DOWN: + tap: 'PgDn' + shifted: '' + INSERT: + tap: 'Ins' + shifted: '' + # "Meh" key + LS(LC(LALT)): $$mdi:star-three-points$$ + + # Arrows + UP: $$mdi:arrow-up-bold$$ + UP_ARROW: $$mdi:arrow-up-bold$$ + DOWN: $$mdi:arrow-down-bold$$ + DOWN_ARROW: $$mdi:arrow-down-bold$$ + LEFT_ARROW: $$mdi:arrow-left-bold$$ + LEFT: $$mdi:arrow-left-bold$$ + RIGHT: $$mdi:arrow-right-bold$$ + RIGHT_ARROW: $$mdi:arrow-right-bold$$ + + # Whitespace + ENTER: + type: enter + tap: $$mdi:keyboard-return$$ + RET: + type: enter + tap: $$mdi:keyboard-return$$ + ESC: $$mdi:keyboard-esc$$ + ESCAPE: $$mdi:keyboard-esc$$ + TAB: $$mdi:keyboard-tab$$ + LS(TAB): $$mdi:keyboard-tab-reverse$$ + SPACE: $$mdi:keyboard-space$$ + BACKSPACE: + type: backspace + tap: $$mdi:backspace$$ + BSPC: + type: backspace + tap: $$mdi:backspace$$ + DELETE: $$mdi:backspace-reverse-outline$$ + DEL: $$mdi:backspace-reverse-outline$$ + + # Locks + CAPSLOCK: $$mdi:apple-keyboard-caps$$ + CAPS: $$mdi:apple-keyboard-caps$$ + + # Sound + C_MUTE: $$mdi:volume-off$$ + C_VOL_UP: $$mdi:volume-high$$ + C_VOL_DN: $$mdi:volume-low$$ + C_VOLUME_UP: $$mdi:volume-high$$ + C_VOLUME_DOWN: $$mdi:volume-low$$ + + # Media + C_NEXT: $$mdi:skip-next$$ + C_PREV: $$mdi:skip-previous$$ + C_PP: $$mdi:play-pause$$ + + # Bluetooth + BT_CLR: $$mdi:bluetooth-off$$ + BT_SEL: $$mdi:bluetooth-connect$$ + + # Settings + C_BRI_UP: $$mdi:brightness-5$$ + C_BRIGHTNESS_INC: $$mdi:brightness-5$$ + C_BRI_DN: $$mdi:brightness-7$$ + C_BRI_DEC: $$mdi:brightness-7$$ + C_BRIGHTNESS_DEC: $$mdi:brightness-7$$ + + # System + C_POWER: $$mdi:power-standby$$ + C_AL_LOCK: $$mdi:lock$$ + K_CANCEL: $$mdi:close-box$$ + K_FIND: $$mdi:apple-finder$$ + # Command + + LG(A): + tap: 'A' + hold: $$mdi:apple-keyboard-command$$ + LG(S): + tap: 'S' + hold: $$mdi:apple-keyboard-command$$ + LG(D): + tap: 'D' + hold: $$mdi:apple-keyboard-command$$ + LG(F): + tap: 'F' + hold: $$mdi:apple-keyboard-command$$ + LG(Z): + tap: 'Z' + hold: $$mdi:apple-keyboard-command$$ + LG(X): + tap: 'X' + hold: $$mdi:apple-keyboard-command$$ + LG(C): + tap: 'C' + hold: $$mdi:apple-keyboard-command$$ + LG(V): + tap: 'V' + hold: $$mdi:apple-keyboard-command$$ + # Zoom + RG(RS(A)): + tap: $$mdi:microphone$$ + hold: zoom + RG(RS(V)): + tap: $$mdi:video$$ + hold: zoom + + zmk_combos: + combo_to_2: + align: top + combo_to_3: + align: top + combo_bt_clear: + align: top + offset: 0.03 + combo_mute: + align: top + offset: 0.15 + combo_minus: + key: + shifted: "_" + hold: "-" + combo_equal: + key: + shifted: "+" + hold: "=" + combo_backslash: + key: + shifted: "|" + hold: \ + combo_lbkt: + key: + shifted: "{" + hold: "[" + combo_rbkt: + key: + shifted: "}" + hold: "]" + combo_semicolon: + key: + shifted: ":" + hold: ";"