Skip to content

Commit

Permalink
zmk-studio support, maus (main branch) support, better batt for periph
Browse files Browse the repository at this point in the history
  • Loading branch information
mctechnology17 committed Nov 8, 2024
1 parent e93663c commit ba79332
Show file tree
Hide file tree
Showing 19 changed files with 324 additions and 276 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
132 changes: 100 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/).

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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/
Expand Down
10 changes: 7 additions & 3 deletions boards/shields/corne/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions boards/shields/corne/corne.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@

#include <dt-bindings/zmk/matrix_transform.h>

#include <layouts/foostan/corne/5column.dtsi>
#include <layouts/foostan/corne/6column.dtsi>

&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 {
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions boards/shields/corne/corne.zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ features:
- keys
- display
- underglow
- studio
siblings:
- corne_left
- corne_right
Expand Down
53 changes: 17 additions & 36 deletions boards/shields/corne/corne_dongle_pro_micro.conf
Original file line number Diff line number Diff line change
@@ -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
# 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
# La unidad del intervalo del informe de energía de la batería es segundos
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
### DEBUG OPTIONS
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
Loading

0 comments on commit ba79332

Please sign in to comment.