diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fa6ee01..94c06aa 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,8 +1,17 @@ Changelog file for Structures extra. https://github.com/mctechnology17/zmk-config/blob/main/CHANGELOG.txt +# FEATURES 0.0.2-beta1 (Nov 08, 2024) +======================================= + # FEATURES 0.0.1-beta1 (Aug 22, 2024) ======================================= ++ NEW FEATURES +- [x] zmk-studio support +- [x] Add zmk modules from the community +- [x] Add better keymap-drawer customization +- [x] NiceView support for seeeduino_xiao_ble +- [x] Dongle with NiceView support for all nrf52840 # List of exciting new features + NEW FEATURES @@ -22,7 +31,3 @@ https://github.com/mctechnology17/zmk-config/blob/main/CHANGELOG.txt - [ ] Add EXTRA_CONF_FILE for each device - [ ] Add build for rgb + oled display - [ ] Add build for rgb + oled display + dongle -- [ ] Add zmk modules from the community -- [ ] Add better keymap-drawer customization -- [ ] NiceView support for seeeduino_xiao_ble -- [ ] Dongle with NiceView support for all nrf52840 diff --git a/README.md b/README.md index b7e9e51..27efedb 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,16 @@ - [USEFUL TIPS](#USEFUL-TIPS) - [RELATED PROJECTS](#RELATED-PROJECTS) - [DONGLE DESIGNS](#DONGLE-DESIGNS) +- [ZMK STUDIO](#ZMK-STUDIO) +- [MODULE INTEGRATION](#MODULE-INTEGRATION) - [INSPIRATIONS](#INSPIRATIONS) - [MY OTHER PROJECTS](#MY-OTHER-PROJECTS) ---- +If you already have your corne configured with this repository and want to make +a modification to your keymap, you can do it with the online [ZMK-STUDIO](https://zmk.studio/). + If you already have your corne configured with this repository and want to make a modification to your keymap, you can do it with the online [keymap-editor](https://nickcoutsos.github.io/keymap-editor/). @@ -56,7 +61,7 @@ that you can have a base configuration and you can modify it to your liking. This base includes the most recent corne configurations, featuring a setup for the Corne dongle with/without an OLED screen. -You can also use your keyboard without a dongle of course. with any of the +You can also use your keyboard WITH / WITHOUT a dongle of course. with any of the plates or screens you have. Tested with **[puchi_ble_v1]** (used as a dongle and as @@ -105,10 +110,19 @@ peripherals), **[nice_nano_v2]** (used as a dongle and as peripherals), > 4. Disable the builds you don't need in the file [build.yaml](./build.yaml), > by default they are all activated. + +### zmk-studio +This repository includes the necessary configuration to use zmk-studio without +the need to configure anything else. You just have to follow the steps below: +- fork this repository y flash the firmware to the keyboard with the uf2 files (see as below en normal procedure) +- connect the master (dongle or central) to the PC +- Modify the keyboard mapping on the go with [ZMK Studio + Web](https://zmk.studio/) and enjoy the changes! + +### normal procedure 1. Fork this repository (I appreciate if you follow me on [github] and [youtube]) 2. Modify the keyboard mapping with [keymap-editor]. If you want to read about - the features of this editor you can do so - [here](https://github.com/nickcoutsos/keymap-editor). + the features of this editor you can do so here: [ZMK Studio Web](https://zmk.studio/) or [keymap-editor](https://github.com/nickcoutsos/keymap-editor). 3. Save changes and commit (optional) 4. Go to actions on github and download the artifacts - Actions(click) -> All Workflows (click)-> Initial User Config. (here you @@ -118,11 +132,11 @@ peripherals), **[nice_nano_v2]** (used as a dongle and as peripherals), - unzip the .zip file - Connect the nice!nano v2 microcontroller to the USB-C port of your computer - the microcontroller is recognized as a storage device -5. Flash the firmware to the keyboard with the uf2 files (drag and drop and with dongle) +5. Flash the firmware to the keyboard with the uf2 files (drag and drop and WITH dongle) - xiao_corne_dongle_xiao_dongle_display.uf2 for [seeeduino_xiao_ble] as a dongle - nice_corne_left_peripheral.uf2 for [nice_nano_v2] as a peripheral - nice_corne_right.uf2 for [nice_nano_v2] as a peripheral -6. Flash the firmware to the keyboard with the uf2 files (drag and drop and without dongle) +6. Flash the firmware to the keyboard with the uf2 files (drag and drop and WITHOUT dongle) - nice_corne_left.uf2 for [nice_nano_v2] as a master side - nice_corne_right.uf2 for [nice_nano_v2] as a peripheral 7. If you need help, you can ask in the [ZMK Discord] @@ -183,33 +197,33 @@ zmk-config # main folder ├── Makefile # file for compilation ├── README.md # readme this file ├── build.yaml # config file for compilation on the github server -├── config # configuration folder -│   ├── boards -│   │   ├── ... # other boards -│   │   ├── nice_nano_v2.overlay -│   │   ├── puchi_ble_v1.overlay -│   │   └── shields -│   │   ├── corne -│   │   │   ├── Kconfig.defconfig # modify if you want to add a new shield -│   │   │   ├── Kconfig.shield # modify if you want to add a new shield -│   │   │   ├── boards -│   │   │   │   ├── ... # other boards -│   │   │   ├── corne.conf # general configurations of the corne -│   │   │   ├── corne.dtsi # default dtsi -│   │   │   ├── corne.keymap # default keymap -│   │   │   ├── corne.zmk.yml # modify if you want to add a new shield -│   │   │   ├── corne_dongle_pro_micro.conf # conf dongle pro_micro pinout -│   │   │   ├── corne_dongle_pro_micro.overlay # properties/displays dongle -│   │   │   ├── corne_dongle_xiao.conf # conf dongle xiao pinout -│   │   │   ├── corne_dongle_xiao.overlay # properties/displays dongle -│   │   │   ├── corne_left.conf # conf left -│   │   │   ├── corne_left_peripheral.conf # config left peripheral -│   │   │   ├── corne_right.conf # conf right -│   │   │   ├── ... # other files -│   │   └── dongle_display -│   │      ├── ... # here you can modify the screen widgets -│   │      └── widgets -│   │      └── # here you can modify the screen widgets +│   boards +│   ├── ... # other boards +│   ├── nice_nano_v2.overlay +│   ├── puchi_ble_v1.overlay +│   └── shields +│   ├── corne +│   │   ├── Kconfig.defconfig # modify if you want to add a new shield +│   │   ├── Kconfig.shield # modify if you want to add a new shield +│   │   ├── boards +│   │   │   ├── ... # other boards +│   │   ├── corne.conf # general configurations of the corne +│   │   ├── corne.dtsi # default dtsi +│   │   ├── corne.keymap # default keymap +│   │   ├── corne.zmk.yml # modify if you want to add a new shield +│   │   ├── corne_dongle_pro_micro.conf # conf dongle pro_micro pinout +│   │   ├── corne_dongle_pro_micro.overlay # properties/displays dongle +│   │   ├── corne_dongle_xiao.conf # conf dongle xiao pinout +│   │   ├── corne_dongle_xiao.overlay # properties/displays dongle +│   │   ├── corne_left.conf # conf left +│   │   ├── corne_left_peripheral.conf # config left peripheral +│   │   ├── corne_right.conf # conf right +│   │   ├── ... # other files +│   └── dongle_display +│      ├── ... # here you can modify the screen widgets +│      └── widgets +│      └── # here you can modify the screen widgets +│ config # configuration folder │   ├── config_keymap-drawer.yaml # config file keymap-drawer │   ├── corne.conf # general configurations of the corne │   ├── corne.keymap # your keymap file @@ -413,6 +427,56 @@ control, shift, alt, windows/mac, etc. An example of Dongle Designs (by @rain2813): [![dongle-designs-demo](src/macintosh.png)](https://www.youtube.com/c/mctechnology17) +# ZMK STUDIO + +This repository includes the necessary configuration to use zmk-studio without +the need to configure anything else. You just have to follow the steps below: +- fork this repository y flash the firmware to the keyboard with the uf2 files +- connect the master (dongle or central) to the PC +- Modify the keyboard mapping on the go with [ZMK Studio + Web](https://zmk.studio/) and enjoy the changes! + +> [!TIP] +> +> 1. For zmk-studio it is necessary to enable the `&studio_unlock` macro but you +> can skip this if you use `CONFIG_ZMK_STUDIO_LOCKING=n` in your zmk +> configuration. This is enabled by default in this repository. +> 2. Remember that this has to be activated on the master and the dongle: +> `snippet: studio-rpc-usb-uart` +> 3. with the `cmake-args: -DCONFIG_ZMK_USB=y` flag you can activate the master +> (dongle or central) to connect always defaults to usb. +> 4. The zmk-studio only connects with USB on the web and only BLE in the app, +> it is useful to have a toggle key to switch between BLE and USB. (this is +> what I understood, if not, please correct me) + +Useful links: +- [ZMK Studio Web](https://zmk.studio/) +- [ZMK Studio Unlock Behavior](https://zmk.dev/docs/keymaps/behaviors/studio-unlock/) +- [ZMK Studio Testing Steps / click hier for more ...](https://discord.com/channels/719497620560543766/719544534500900886/1296241576263024641): + * [Set up ZMK Studio](https://zmk.dev/docs/development/hardware-integration/studio-setup) for your device, if needed. + * [Build with ZMK Studio enabled](https://zmk.dev/docs/features/studio) and flash to the device. + * Test ZMK Studio by loading https://zmk.studio/ or installing the app from the latest release at https://github.com/zmkfirmware/zmk-studio/releases/ + +### Reporting + +Please report any and all testing results, even successful results in [Discord +zmk-studio](https://discord.com/channels/719497620560543766/722441502948851741.) +If you have a genuine bug to report, please file a new [GitHub +Issue](https://github.com/zmkfirmware/zmk-studio/issues/new/choose). With any +bugs or testing results, please include all the relevant details, including the +host OS, app/browser details, keyboard used, link to your config repo, etc. + +# MODULE INTEGRATION +> [!TIP] +> +> 1. You can activate or deactivate the animation with: CONFIG_NICE_VIEW_GEM_ANIMATION=n +> the animation is not activated by default in this repository for saving +> battery. This is activated only in the peripheries and the corne master, not +> in the dongles, because this module shows the status of the batteries in the +> peripheries + +See module details here for more information and more configurations: [nice-view-gem](https://github.com/M165437/nice-view-gem) + # INSPIRATIONS - [englmaxi/zmk-config](https://github.com/englmaxi/zmk-config) @@ -434,6 +498,10 @@ If you enjoy my contributions, feel free to donate. I appreciate if you follow m - [paypal] - [sponsor] +# TODO +- [ ] Add more features to the repository +- [ ] Update the documentation + [^1]: Keymap-drawer, https://github.com/caksoylar/keymap-drawer https://keymap-drawer.streamlit.app/ [^2]: caksoylar zmk-config example for keymap-drawer https://github.com/caksoylar/zmk-config [^3]: Install pipx, https://pipx.pypa.io/stable/ diff --git a/boards/shields/corne/Kconfig.defconfig b/boards/shields/corne/Kconfig.defconfig index 356a88b..adc0f01 100644 --- a/boards/shields/corne/Kconfig.defconfig +++ b/boards/shields/corne/Kconfig.defconfig @@ -6,12 +6,16 @@ config ZMK_KEYBOARD_NAME config ZMK_SPLIT_ROLE_CENTRAL default y -config ZMK_USB - default y +# if SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO + +# config ZMK_USB +# default y + +# endif endif -if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_LEFT_PERIPHERAL || SHIELD_CORNE_DONGLE_PRO_MICRO +if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_LEFT_PERIPHERAL || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO config ZMK_SPLIT default y diff --git a/boards/shields/corne/corne.dtsi b/boards/shields/corne/corne.dtsi index e1edcce..e1dcc05 100644 --- a/boards/shields/corne/corne.dtsi +++ b/boards/shields/corne/corne.dtsi @@ -6,11 +6,22 @@ #include +#include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { zephyr,display = &oled; zmk,kscan = &kscan0; - zmk,matrix-transform = &default_transform; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { @@ -36,7 +47,7 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) diff --git a/boards/shields/corne/corne.zmk.yml b/boards/shields/corne/corne.zmk.yml index abde32e..c496aef 100644 --- a/boards/shields/corne/corne.zmk.yml +++ b/boards/shields/corne/corne.zmk.yml @@ -9,6 +9,7 @@ features: - keys - display - underglow + - studio siblings: - corne_left - corne_right diff --git a/boards/shields/corne/corne_dongle_pro_micro.conf b/boards/shields/corne/corne_dongle_pro_micro.conf index c0544be..2560437 100644 --- a/boards/shields/corne/corne_dongle_pro_micro.conf +++ b/boards/shields/corne/corne_dongle_pro_micro.conf @@ -1,49 +1,30 @@ # MC: -# compatible with all versions of nrf52840 (pro micro): -# - nice_nano (not tested) -# - nice_nano_v2 (tested) -# - nice_nano_v2 (super mini -> nice_nano_v2 clon) (tested) -# - nrfmicro_11 (not tested) -# - nrfmicro_11_flipped (not tested) -# - nrfmicro_13 (not tested) -# - puchi_ble_v1 (tested) +# compatible con todas las versiones de nrf52840 (pro_micro): +# - nice_nano (no probado) +# - nice_nano_v2 (probado) +# - nice_nano_v2 (super mini -> nice_nano_v2 clon) (probado) +# - nrfmicro_11 (no probado) +# - nrfmicro_11_flipped (no probado) +# - nrfmicro_13 (no probado) +# - puchi_ble_v1 (probado) +### DONGLE MODE +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 + +### DONGLE OPTIONS # 3 profiles (n+2) CONFIG_BT_MAX_CONN=5 CONFIG_BT_MAX_PAIRED=5 -# dongle mode -CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 - -# display +### DISPLAY DONGLE OPTIONS CONFIG_ZMK_DISPLAY=y CONFIG_BT_BAS=n CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y -# enable logging and configure zmk logging to debug output +### POWER OPTIONS +# La unidad del intervalo del informe de energía de la batería es segundos +CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60 + +### DEBUG OPTIONS # CONFIG_ZMK_USB_LOGGING=y # CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000 - -### POWER OPTIONS -CONFIG_ZMK_EXT_POWER=y -# the battery power report interval unit is seconds -CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60 -# MC: changed so that he always stays awake -CONFIG_ZMK_SLEEP=n -# 1800000 milliseconds = 30 minutes * 60 seconds * 1000 -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 -# number of milliseconds of inactivity before entering idle state -CONFIG_ZMK_IDLE_TIMEOUT=60000 -# add keyboard bounce -# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5 -# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 -# Increase the transmission power of the keyboard ble radio to solve the -# problem of left and right delay and poor communication. -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y -# change default keyboard display name -# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled" -CONFIG_ZMK_MOUSE=y - -### Improves compatibility with iPad -CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y diff --git a/boards/shields/corne/corne_dongle_pro_micro.overlay b/boards/shields/corne/corne_dongle_pro_micro.overlay index bc9e22b..54f4758 100644 --- a/boards/shields/corne/corne_dongle_pro_micro.overlay +++ b/boards/shields/corne/corne_dongle_pro_micro.overlay @@ -1,10 +1,27 @@ +/* + * Copyright (c) 2020 Pete Johanson + * + * SPDX-License-Identifier: MIT + */ + #include +#include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { - zmk,kscan = &mock_kscan; - zmk,matrix-transform = &default_transform; zephyr,display = &oled; + zmk,kscan = &mock_kscan; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { @@ -30,7 +47,7 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) @@ -39,6 +56,19 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 >; }; + /* + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + + input-gpios + = <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + */ + mock_kscan: kscan_0 { compatible = "zmk,kscan-mock"; // wakeup-source; @@ -46,7 +76,6 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 rows = <0>; events = <0>; }; - // TODO: per-key RGB node(s)? }; diff --git a/boards/shields/corne/corne_dongle_xiao.conf b/boards/shields/corne/corne_dongle_xiao.conf index e820991..1d9fa26 100644 --- a/boards/shields/corne/corne_dongle_xiao.conf +++ b/boards/shields/corne/corne_dongle_xiao.conf @@ -1,43 +1,24 @@ # MC: -# compatible with all versions of nrf52840 (xiao): -# - seeeduino_xiao_ble (tested) +# compatible con todas las versiones de nrf52840 (xiao): +# - seeeduino_xiao_ble (probado) +### DONGLE MODE +CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 + +### DONGLE OPTIONS # 3 profiles (n+2) CONFIG_BT_MAX_CONN=5 CONFIG_BT_MAX_PAIRED=5 -# dongle mode -CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2 - -# display +### DISPLAY DONGLE OPTIONS CONFIG_ZMK_DISPLAY=y CONFIG_BT_BAS=n CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y -# enable logging and configure zmk logging to debug output +### POWER OPTIONS +# La unidad del intervalo del informe de energía de la batería es segundos +CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60 + +### DEBUG OPTIONS # CONFIG_ZMK_USB_LOGGING=y # CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000 - -### POWER OPTIONS -CONFIG_ZMK_EXT_POWER=y -# the battery power report interval unit is seconds -CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60 -# MC: changed so that he always stays awake -CONFIG_ZMK_SLEEP=n -# 1800000 milliseconds = 30 minutes * 60 seconds * 1000 -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 -# number of milliseconds of inactivity before entering idle state -CONFIG_ZMK_IDLE_TIMEOUT=60000 -# add keyboard bounce -# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5 -# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 -# Increase the transmission power of the keyboard ble radio to solve the -# problem of left and right delay and poor communication. -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y -# change default keyboard display name -# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled" -CONFIG_ZMK_MOUSE=y - -### Improves compatibility with iPad -CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y diff --git a/boards/shields/corne/corne_dongle_xiao.overlay b/boards/shields/corne/corne_dongle_xiao.overlay index adfac58..ee33b01 100644 --- a/boards/shields/corne/corne_dongle_xiao.overlay +++ b/boards/shields/corne/corne_dongle_xiao.overlay @@ -6,11 +6,22 @@ #include +#include +#include + +&foostan_corne_6col_layout { + transform = <&default_transform>; +}; + +&foostan_corne_5col_layout { + transform = <&five_column_transform>; +}; + / { chosen { - zmk,kscan = &mock_kscan; - zmk,matrix-transform = &default_transform; zephyr,display = &oled; + zmk,kscan = &mock_kscan; + zmk,physical-layout = &foostan_corne_6col_layout; }; default_transform: keymap_transform_0 { @@ -36,7 +47,7 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) // | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | // | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | // | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | -// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | +// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 | map = < RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) @@ -45,6 +56,19 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 >; }; + /* + kscan0: kscan { + compatible = "zmk,kscan-gpio-direct"; + + input-gpios + = <&xiao_d 0 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 1 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 2 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + , <&xiao_d 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)> + ; + }; + */ + mock_kscan: kscan_0 { compatible = "zmk,kscan-mock"; // wakeup-source; @@ -154,23 +178,28 @@ RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10 }; }; -// TODO: niceview +// ################# niceview working fine START ################# +// doc: https://wiki.seeedstudio.com/XIAO-SAMD21-Zephyr-RTOS/ +// @bravekarma nice Discord server +// The &gpioX Y and NRF_PSEL(..., X, Y) uses the PX.Y notation (underlying nRF +// pin numbers), &xiao_d x uses the unified pinout Dx + &pinctrl { - spi0_default: spi0_default { - group1 { - psels = , - , - ; - }; - }; - spi0_sleep: spi0_sleep { - group1 { - psels = , // D5 - , // D4 - ; - low-power-enable; - }; - }; + spi0_default: spi0_default { + group1 { + psels = , + , + ; + }; + }; + spi0_sleep: spi0_sleep { + group1 { + psels = , + , + ; + low-power-enable; + }; + }; }; nice_view_spi: &spi0 { @@ -178,7 +207,12 @@ nice_view_spi: &spi0 { pinctrl-0 = <&spi0_default>; pinctrl-1 = <&spi0_sleep>; pinctrl-names = "default", "sleep"; - cs-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; // D6 + cs-gpios = <&xiao_d 6 GPIO_ACTIVE_HIGH>; // Pin D6 as CS }; + +&xiao_i2c { + status = "disabled"; +}; +// ################# niceview working fine END ################# */ // vim: filetype=dts fdm=marker: diff --git a/boards/shields/corne/corne_left.conf b/boards/shields/corne/corne_left.conf index 27733e3..e69de29 100644 --- a/boards/shields/corne/corne_left.conf +++ b/boards/shields/corne/corne_left.conf @@ -1,43 +0,0 @@ -### OLED Display -# CONFIG_ZMK_DISPLAY=y -# esto creo que ya no es necesario -# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y -# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y - -# Enable and adjust nice!view -CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -# CONFIG_ZMK_WIDGET_WPM_STATUS=n -CONFIG_ZMK_WIDGET_LAYER_STATUS=y -CONFIG_ZMK_WIDGET_BATTERY_STATUS=y -CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y - -# Disable in-built nice!view widget -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -# Enable custom nice!view widget -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -# Increase the bluetooth transmission power -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y - -### POWER OPTIONS -# CONFIG_ZMK_EXT_POWER=y -# CONFIG_ZMK_SLEEP=n -# 1800000 milisegundos = 30 minutos * 60 segundos * 1000 -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 -# Número de milisegundos de inactividad antes de entrar en estado inactivo -# CONFIG_ZMK_IDLE_TIMEOUT=60000 - -### MOUSE -CONFIG_ZMK_MOUSE=y - -### Improves compatibility with iPad -CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y - -### HID para nice!view ePaperDisplay -# Enable eager debouncing -# "Eager Debouncing" -# Trying to lower the input lag. -CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 diff --git a/boards/shields/corne/corne_left.overlay b/boards/shields/corne/corne_left.overlay index 117cb19..d96a5de 100644 --- a/boards/shields/corne/corne_left.overlay +++ b/boards/shields/corne/corne_left.overlay @@ -16,3 +16,5 @@ , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; }; + +// vim: filetype=dts fdm=marker: diff --git a/boards/shields/corne/corne_left_peripheral.conf b/boards/shields/corne/corne_left_peripheral.conf index a4e6531..e69de29 100644 --- a/boards/shields/corne/corne_left_peripheral.conf +++ b/boards/shields/corne/corne_left_peripheral.conf @@ -1,38 +0,0 @@ -# Increase the bluetooth transmission power -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y - -### MOUSE -CONFIG_ZMK_MOUSE=y - -### POWER OPTIONS -# CONFIG_ZMK_EXT_POWER=y -# CONFIG_ZMK_SLEEP=n -# 1800000 milisegundos = 30 minutos * 60 segundos * 1000 -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 -# Número de milisegundos de inactividad antes de entrar en estado inactivo -# CONFIG_ZMK_IDLE_TIMEOUT=60000 - -# Enable and adjust nice!view -CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -CONFIG_ZMK_WIDGET_BATTERY_STATUS=y -# Disable other widgets, because don't work with pheripherals -CONFIG_ZMK_WIDGET_WPM_STATUS=n -CONFIG_ZMK_WIDGET_LAYER_STATUS=n -CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n - -# Disable in-built nice!view widget -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -# Enable custom nice!view widget -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -### Improves compatibility with iPad -CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y - -### HID para nice!view ePaperDisplay -# Enable eager debouncing -# "Eager Debouncing" -# Trying to lower the input lag. -CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 diff --git a/boards/shields/corne/corne_left_peripheral.overlay b/boards/shields/corne/corne_left_peripheral.overlay index 117cb19..d96a5de 100644 --- a/boards/shields/corne/corne_left_peripheral.overlay +++ b/boards/shields/corne/corne_left_peripheral.overlay @@ -16,3 +16,5 @@ , <&pro_micro 14 GPIO_ACTIVE_HIGH> ; }; + +// vim: filetype=dts fdm=marker: diff --git a/boards/shields/corne/corne_right.conf b/boards/shields/corne/corne_right.conf index a4e6531..e69de29 100644 --- a/boards/shields/corne/corne_right.conf +++ b/boards/shields/corne/corne_right.conf @@ -1,38 +0,0 @@ -# Increase the bluetooth transmission power -CONFIG_BT_CTLR_TX_PWR_PLUS_8=y -CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y - -### MOUSE -CONFIG_ZMK_MOUSE=y - -### POWER OPTIONS -# CONFIG_ZMK_EXT_POWER=y -# CONFIG_ZMK_SLEEP=n -# 1800000 milisegundos = 30 minutos * 60 segundos * 1000 -# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000 -# Número de milisegundos de inactividad antes de entrar en estado inactivo -# CONFIG_ZMK_IDLE_TIMEOUT=60000 - -# Enable and adjust nice!view -CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y -CONFIG_ZMK_WIDGET_BATTERY_STATUS=y -# Disable other widgets, because don't work with pheripherals -CONFIG_ZMK_WIDGET_WPM_STATUS=n -CONFIG_ZMK_WIDGET_LAYER_STATUS=n -CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n - -# Disable in-built nice!view widget -CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -# Enable custom nice!view widget -CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y -CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y - -### Improves compatibility with iPad -CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y - -### HID para nice!view ePaperDisplay -# Enable eager debouncing -# "Eager Debouncing" -# Trying to lower the input lag. -CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 diff --git a/boards/shields/corne/corne_right.overlay b/boards/shields/corne/corne_right.overlay index a8a0cfe..7b2b752 100644 --- a/boards/shields/corne/corne_right.overlay +++ b/boards/shields/corne/corne_right.overlay @@ -24,3 +24,5 @@ , <&pro_micro 21 GPIO_ACTIVE_HIGH> ; }; + +// vim: filetype=dts fdm=marker: diff --git a/build.yaml b/build.yaml index df6146c..3c832c7 100644 --- a/build.yaml +++ b/build.yaml @@ -56,12 +56,18 @@ include: # nice - board: nice_nano_v2 - shield: corne_left nice_view_adapter nice_view + # required: https://github.com/M165437/nice-view-gem + # shield: corne_left nice_view_adapter nice_view + shield: corne_left nice_view_adapter nice_view_gem cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\" artifact-name: nice_corne_left + snippet: studio-rpc-usb-uart # shield: corne_left # for OLED no nice_view - board: nice_nano_v2 - shield: corne_right nice_view_adapter nice_view + # required: https://github.com/M165437/nice-view-gem + # shield: corne_right nice_view_adapter nice_view + shield: corne_right nice_view_adapter nice_view_gem + cmake-args: -DCONFIG_NICE_VIEW_GEM_ANIMATION=n artifact-name: nice_corne_right # shield: corne_right # for OLED no nice_view @@ -70,6 +76,7 @@ include: shield: corne_left nice_view_adapter nice_view cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Corne_View\" artifact-name: puchi_corne_left + snippet: studio-rpc-usb-uart # shield: corne_left # for OLED no nice_view - board: puchi_ble_v1 shield: corne_right nice_view_adapter nice_view @@ -78,7 +85,10 @@ include: # peripheral_left - board: nice_nano_v2 - shield: corne_left_peripheral nice_view_adapter nice_view + # required: https://github.com/M165437/nice-view-gem + shield: corne_left_peripheral nice_view_adapter nice_view_gem + # shield: corne_left_peripheral nice_view_adapter nice_view + cmake-args: -DCONFIG_NICE_VIEW_GEM_ANIMATION=n artifact-name: nice_corne_left_peripheral - board: puchi_ble_v1 shield: corne_left_peripheral nice_view_adapter nice_view @@ -87,36 +97,45 @@ include: # Xiao_Dongle - board: seeeduino_xiao_ble shield: corne_dongle_xiao - cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" + # -DCONFIG_ZMK_USB=y -DCONFIG_ZMK_BLE=y + cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" -DCONFIG_ZMK_STUDIO=y artifact-name: xiao_corne_dongle_xiao - snippet: zmk-usb-logging + snippet: studio-rpc-usb-uart - board: seeeduino_xiao_ble shield: corne_dongle_xiao dongle_display cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle_O\" artifact-name: xiao_corne_dongle_xiao_dongle_display - snippet: zmk-usb-logging + snippet: studio-rpc-usb-uart + # snippet: zmk-usb-logging # ProMicro_Dongle - board: nice_nano_v2 shield: corne_dongle_pro_micro cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle\" artifact-name: nice_corne_dongle_pro_micro - snippet: zmk-usb-logging + snippet: studio-rpc-usb-uart + # snippet: zmk-usb-logging - board: nice_nano_v2 shield: corne_dongle_pro_micro dongle_display cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle_O\" artifact-name: nice_corne_dongle_pro_micro_dongle_display - snippet: zmk-usb-logging + snippet: studio-rpc-usb-uart + # snippet: zmk-usb-logging - board: puchi_ble_v1 shield: corne_dongle_pro_micro cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle\" artifact-name: puchi_corne_dongle_pro_micro - snippet: zmk-usb-logging + snippet: studio-rpc-usb-uart + # snippet: zmk-usb-logging - board: puchi_ble_v1 - shield: corne_dongle_pro_micro dongle_display - cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle_O\" - artifact-name: puchi_corne_dongle_pro_micro_dongle_display - snippet: zmk-usb-logging + # required: https://github.com/M165437/nice-view-gem + # shield: corne_dongle_pro_micro nice_view_adapter dongle_display_view_pro_micro + shield: corne_dongle_pro_micro nice_view_adapter nice_view_gem + # -DCONFIG_ZMK_USB=y -DCONFIG_ZMK_BLE=y + cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle_V\" -DCONFIG_ZMK_STUDIO=y + snippet: studio-rpc-usb-uart + artifact-name: puchi_corne_dongle_pro_micro_dongle_display_view + # snippet: zmk-usb-logging # settings_reset - board: nice_nano_v2 diff --git a/config/corne.conf b/config/corne.conf index 0dc59f1..f0547ed 100644 --- a/config/corne.conf +++ b/config/corne.conf @@ -34,13 +34,20 @@ # CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne Oled" ### Boost Bluetooth TX power, also make Bluetooth stronger -# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_BT_CTLR_TX_PWR_PLUS_8=y +CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y # Tune bluetooth profiles for quick select # CONFIG_BT_MAX_CONN=3 +# Uncomment the following line if you facing issue on win 11 connection +# Enables a combination of settings that are planned to be default in future +# versions of ZMK to improve connection stability. This includes changes to +# timing on BLE pairing initiation, restores use of the updated/new LLCP +# implementation, and disables 2M PHY support. +CONFIG_ZMK_BLE_EXPERIMENTAL_CONN=y ### POWER OPTIONS -# CONFIG_ZMK_EXT_POWER=y -# CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_SLEEP=y +CONFIG_ZMK_EXT_POWER=y # 15 min (15*60*1000ms) # CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000 # 1 min Número de milisegundos de inactividad antes de entrar en estado inactivo @@ -52,8 +59,16 @@ # CONFIG_ZMK_EXT_POWER_USB_ONLY=y ### MOUSE +# https://github.com/zmkfirmware/zmk/blob/main/docs/docs/keymaps/behaviors/mouse-emulation.md # CONFIG_ZMK_MOUSE=y +### ZMK STUDIO +# MC: 2. zmk-studio test START +# https://github.com/zmkfirmware/zmk/blob/main/docs/docs/config/studio.md +CONFIG_ZMK_STUDIO=y +CONFIG_ZMK_STUDIO_LOCKING=n +# MC: zmk-studio test END + ### RGB UNDERGLOW # uncomment to enable RGB Underglow or backlight # CONFIG_ZMK_RGB_UNDERGLOW=y @@ -81,13 +96,14 @@ # on and off. This also causes the display to turn off. # CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n -### OLED Display -# CONFIG_ZMK_DISPLAY=y +### OLED DISPLAY +CONFIG_ZMK_DISPLAY=y +CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y # esto creo que ya no es necesario # CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y # CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y -### WIDGET SETTINGS compatible SOLO con OLED +### WIDGET SETTINGS # No Widget configurations added since nice!view has its own custom widgets # activar solo estos dos widgets # CONFIG_ZMK_WIDGET_WPM_STATUS=n @@ -100,8 +116,13 @@ # Enable eager debouncing # "Eager Debouncing" # Trying to lower the input lag. -# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 -# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 +CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1 +CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5 ### Improves compatibility with iPad -# CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y +# ref: https://zmk.dev/docs/config/system#hid +CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y + +### DEBUG OPTIONS +# CONFIG_ZMK_USB_LOGGING=y +# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000 diff --git a/config/corne.keymap b/config/corne.keymap index 5bbe9a0..226563b 100644 --- a/config/corne.keymap +++ b/config/corne.keymap @@ -54,7 +54,7 @@ &kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC &kp LCTRL &trans &trans &mkp LCLK &trans &mkp RCLK &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE &kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE - &kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT + &kp LGUI &studio_unlock &kp SPACE &kp RET &studio_unlock &kp RALT >; }; }; diff --git a/config/west.yml b/config/west.yml index f709e56..66beba5 100644 --- a/config/west.yml +++ b/config/west.yml @@ -1,11 +1,18 @@ manifest: remotes: - - name: urob - url-base: https://github.com/urob + # - name: urob + # url-base: https://github.com/urob + - name: zmkfirmware + url-base: https://github.com/zmkfirmware + - name: m165437 #new entry + url-base: https://github.com/M165437 #new entry projects: - name: zmk - remote: urob + remote: zmkfirmware revision: main import: app/west.yml + - name: nice-view-gem #new entry + remote: m165437 #new entry + revision: main #new entry self: path: config diff --git a/keymap-drawer/corne.svg b/keymap-drawer/corne.svg index 40c96a2..5045b2a 100644 --- a/keymap-drawer/corne.svg +++ b/keymap-drawer/corne.svg @@ -723,9 +723,9 @@ rect.held, rect.combo.held { Gui - - - + + +&studio_u… @@ -737,6 +737,7 @@ rect.held, rect.combo.held { +&studio_u… diff --git a/keymap-drawer/corne.yaml b/keymap-drawer/corne.yaml index 049ced4..20f5cd4 100644 --- a/keymap-drawer/corne.yaml +++ b/keymap-drawer/corne.yaml @@ -82,8 +82,8 @@ layers: - '|' - '~' - Gui - - {t: ▽, type: trans} + - '&studio_unlock' - ␣ - ⏎ - - {type: held} + - {t: '&studio_unlock', type: held} - Alt