Full Code of mctechnology17/zmk-config for AI

main 3d4d341bec97 cached
132 files
250.2 KB
88.9k tokens
1 requests
Download .txt
Showing preview only (285K chars total). Download the full file or copy to clipboard to get everything.
Repository: mctechnology17/zmk-config
Branch: main
Commit: 3d4d341bec97
Files: 132
Total size: 250.2 KB

Directory structure:
gitextract_f__jg5f7/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── build.yml
│       └── keymap-drawer.yaml
├── .gitignore
├── CHANGELOG.txt
├── LICENSE
├── Makefile
├── README.md
├── boards/
│   ├── nice_nano.overlay
│   ├── nice_nano_v2.overlay
│   ├── nrfmicro_11.overlay
│   ├── nrfmicro_11_flipped.overlay
│   ├── nrfmicro_13.overlay
│   ├── puchi_ble_v1.overlay
│   ├── seeeduino_xiao_ble.overlay
│   └── shields/
│       ├── corne/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   └── nice_nano_v2.overlay
│       │   ├── corne.conf
│       │   ├── corne.dtsi
│       │   ├── corne.keymap
│       │   ├── corne.zmk.yml
│       │   ├── corne_dongle_pro_micro.conf
│       │   ├── corne_dongle_pro_micro.overlay
│       │   ├── corne_dongle_xiao.conf
│       │   ├── corne_dongle_xiao.overlay
│       │   ├── corne_left.conf
│       │   ├── corne_left.overlay
│       │   ├── corne_left_peripheral.conf
│       │   ├── corne_left_peripheral.overlay
│       │   ├── corne_right.conf
│       │   └── corne_right.overlay
│       ├── lily58/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   └── nice_nano_v2.overlay
│       │   ├── lily58.conf
│       │   ├── lily58.dtsi
│       │   ├── lily58.keymap
│       │   ├── lily58.zmk.yml
│       │   ├── lily58_dongle_pro_micro.conf
│       │   ├── lily58_dongle_pro_micro.overlay
│       │   ├── lily58_dongle_xiao.conf
│       │   ├── lily58_dongle_xiao.overlay
│       │   ├── lily58_left.conf
│       │   ├── lily58_left.overlay
│       │   ├── lily58_left_peripheral.conf
│       │   ├── lily58_left_peripheral.overlay
│       │   ├── lily58_right.conf
│       │   └── lily58_right.overlay
│       ├── sofle/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   ├── nice_nano_v2.overlay
│       │   │   ├── nrfmicro_11.overlay
│       │   │   └── nrfmicro_13.overlay
│       │   ├── sofle.conf
│       │   ├── sofle.dtsi
│       │   ├── sofle.keymap
│       │   ├── sofle.zmk.yml
│       │   ├── sofle_dongle_pro_micro.conf
│       │   ├── sofle_dongle_pro_micro.overlay
│       │   ├── sofle_dongle_xiao.conf
│       │   ├── sofle_dongle_xiao.overlay
│       │   ├── sofle_left.conf
│       │   ├── sofle_left.overlay
│       │   ├── sofle_left_peripheral.conf
│       │   ├── sofle_left_peripheral.overlay
│       │   ├── sofle_right.conf
│       │   └── sofle_right.overlay
│       └── splitkb_aurora_sofle/
│           ├── Kconfig.defconfig
│           ├── Kconfig.shield
│           ├── boards/
│           │   ├── nice_nano.overlay
│           │   └── nice_nano_v2.overlay
│           ├── splitkb_aurora_sofle.conf
│           ├── splitkb_aurora_sofle.dtsi
│           ├── splitkb_aurora_sofle.keymap
│           ├── splitkb_aurora_sofle.zmk.yml
│           ├── splitkb_aurora_sofle_dongle_pro_micro.conf
│           ├── splitkb_aurora_sofle_dongle_pro_micro.overlay
│           ├── splitkb_aurora_sofle_dongle_xiao.conf
│           ├── splitkb_aurora_sofle_dongle_xiao.overlay
│           ├── splitkb_aurora_sofle_left.overlay
│           ├── splitkb_aurora_sofle_left_peripheral.conf
│           ├── splitkb_aurora_sofle_left_peripheral.overlay
│           └── splitkb_aurora_sofle_right.overlay
├── build.yaml
├── config/
│   ├── config_keymap-drawer.yaml
│   ├── corne.conf
│   ├── corne.keymap
│   ├── keymap_german_mac_iso_zmk.h
│   ├── lily58.conf
│   ├── lily58.keymap
│   ├── sofle.conf
│   ├── sofle.keymap
│   ├── splitkb_aurora_sofle.conf
│   ├── splitkb_aurora_sofle.keymap
│   └── west.yml
├── firmware/
│   ├── nice_corne_dongle_oled.uf2
│   ├── nice_corne_dongle_pro_micro.uf2
│   ├── nice_corne_left_oled.uf2
│   ├── nice_corne_left_peripheral_oled.uf2
│   ├── nice_corne_left_peripheral_view.uf2
│   ├── nice_corne_left_view.uf2
│   ├── nice_corne_right_oled.uf2
│   ├── nice_corne_right_view.uf2
│   ├── nice_settings_reset.uf2
│   ├── puchi_corne_dongle.uf2
│   ├── puchi_corne_dongle_view.uf2
│   ├── puchi_corne_left_oled.uf2
│   ├── puchi_corne_left_peripheral_oled.uf2
│   ├── puchi_corne_left_peripheral_view.uf2
│   ├── puchi_corne_left_view.uf2
│   ├── puchi_corne_right_oled.uf2
│   ├── puchi_corne_right_view.uf2
│   ├── puchi_settings_reset.uf2
│   ├── xiao_corne_dongle.uf2
│   ├── xiao_corne_dongle_oled.uf2
│   └── xiao_settings_reset.uf2
├── keymap-drawer/
│   ├── corne.yaml
│   ├── lily58.yaml
│   ├── sofle.yaml
│   └── splitkb_aurora_sofle.yaml
├── snippets/
│   ├── common-config/
│   │   ├── common-config.conf
│   │   └── snippet.yml
│   ├── dongle-config/
│   │   ├── dongle-config.conf
│   │   └── snippet.yml
│   └── rgb-config/
│       ├── rgb-config.conf
│       └── snippet.yml
└── zephyr/
    └── module.yml

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.dtsi linguist-language=C++
*.keymap linguist-language=C++


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
# WebSite: https://www.youtube.com/c/mctechnology17
github: mctechnology17 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Open Collective username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom:
  - https://www.paypal.com/paypalme/mctechnology17
  - https://buymeacoffee.com/mctechnology17
  - https://revolut.me/mctechnology17
# Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/workflows/build.yml
================================================
on: [push, pull_request, workflow_dispatch]

jobs:
  build:
    uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@v0.3.0


================================================
FILE: .github/workflows/keymap-drawer.yaml
================================================
#     keymap -c config/config_keymap-drawer.yaml parse -c 12 -z config/corne.keymap > keymap-drawer/corne.yaml
#     keymap -c config/config_keymap-drawer.yaml draw keymap-drawer/corne.yaml > keymap-drawer/corne.svg

# Example for using the keymap-drawer ZMK user config workflow
name: Draw ZMK keymaps
on:
  workflow_dispatch: # can be triggered manually
  push: # automatically run on changes to following paths
    paths:
      - "config/*.keymap"
      - "config/config_keymap-drawer.yaml"
      - .github/workflows/keymap-drawer.yaml

jobs:
  draw:
    uses: caksoylar/keymap-drawer/.github/workflows/draw-zmk.yml@main
    permissions:
      contents: write # allow workflow to commit to the repo
    with:
      amend_commit: true
      keymap_patterns: "config/*.keymap" # path to the keymaps to parse
      config_path: "config/config_keymap-drawer.yaml" # config file, ignored if not exists
      output_folder: "keymap-drawer" # path to save produced SVG and keymap YAML files
      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'"


================================================
FILE: .gitignore
================================================
# zmk
zmk/

# sketchybar
sketchybar/dotfiles/
sketchybar/dotfiles
sketchybar/dotfiles/*

# MacOS
.DS_Store
vim-tools_notiz.vim
.DS_Store
./*/.DS_Store
.vscode
# .vimspector.json
push.sh
/test
test/

# c, cpp
*.x
*.d
*.dSYM
*.o
*.out

# log
*.log

# cache
*.cache
cache/

# Windows
Thumbs.db
Desktop.ini

# Tags
#TAGS
#!TAGS/
#tags
doc/tags
tags-cn
!tags/
.tags
.tags1
tags.lock
tags.temp
gtags.files
GTAGS
GRTAGS
GPATH
cscope.files
cscope.out
cscope.in.out
cscope.po.out

# Vim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~

# Test % Tmp
test.*
tmp.*
temp.*

# Java
*.class

# JavaScript
node_modules

# Python
*.pyc
.idea/
/.idea
# build/
__pycache__

# Rust
target/
**/*.rs.bk


================================================
FILE: CHANGELOG.txt
================================================
Changelog file for Structures extra.
https://github.com/mctechnology17/zmk-config/blob/main/CHANGELOG.txt

# FEATURES 0.0.2-beta4 (Feb 27, 2025)
=======================================
+ NEW FEATURES
- [x] build.yaml updated
- [x] Add build for rgb + oled display
- [x] seeeduino_xiao_ble.overlay rgb added
- [x] Add build for rgb + oled display + dongle
- [x] corne.overlay rgb led definition, layer reserved added
- [x] snippet: rgb-config common-config dongle-config for multiple settings
- [x] Add right- left_encoder definition sofle_dongle_pro_micro.overlay sofle_dongle_xiao.overlay
- [x] Add right- left_encoder definition splitkb_aurora_sofle_dongle_pro_micro.overlay splitkb_aurora_sofle_dongle_xiao.overlay
- [x] Add left_encoder definition lily58_dongle_pro_micro.overlay lily58_dongle_xiao.overlay

# FEATURES 0.0.2-beta3 (Jan 06, 2025)
=======================================
+ NEW FEATURES
- [x] lily58 support (see boards/shields/lily58/)
- [x] splitkb_aurora_sofle support (boards/shields/splitkb_aurora_sofle/)
- [x] readme updated
- [x] build.yaml updated
- [x] config_keymap-drawer.yaml updated
- [x] corne.keymap updated (The option to see the layer on the screen was added)

# FEATURES 0.0.2-beta2 (Jan 03, 2025)
=======================================
+ NEW FEATURES
- [x] sofle support
- [x] dongle_display!view support
- [x] oled Adapter support
- [x] readme updated

# FEATURES 0.0.2-beta1 (Dec 19, 2024)
=======================================
+ NEW FEATURES
- [x] nice!oled support
- [x] dongle_display as modul support
- [x] oled display changed 128x32 to 128x64 for xiao
- [x] readme updated
- [x] firmware updated

# 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
- [x]   local/github integration module
- [x]   makefile redundancy eliminated
- [x]   CHANGELOG.md file added
- [x]   dongle support
- [x]   rgb support
- [x]   oled display support
- [x]   rgb + oled display support
- [x]   rgb + oled display + dongle support

+ TODO
- [ ] Add set up the workspace https://github.com/urob/zmk-config?tab=readme-ov-file#set-up-the-workspace
- [ ] Add a wiki to the repository
- [ ] Add a video tutorial to the repository
- [ ] README.md updated + fotos as reference


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2020 The ZMK Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: Makefile
================================================
# ========================================
# FileName: Makefile
# Date: 07.03.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: Makefile for ZMK firmware with Docker
# Shields: corne sofle splitkb_aurora_sofle
# Boards: nice_nano_v2 puchi_ble_v1 seeeduino_xiao_ble
# =========================================
#                              ╔═╦═╦═╗
#                       ╔════╗ ║║║║║╔╝
#                       ║╔╗╔╗║ ║║║║║╚╗
#                       ╚╝║║╚╝ ║╠═╩╩═╝
#                         ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
#                         ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
#                         ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
#                                         ╚═╩═╝
# to update the branch
# https://hub.docker.com/r/zmkfirmware/zmk-dev-arm/tags
# https://github.com/zmkfirmware/zmk/blob/main/.devcontainer/Dockerfile
# docker pull zmkfirmware/zmk-dev-arm:3.2-branch
#
# CUSTOM BRANCH EXAMPLE:
# git clone https://github.com/petejohanson/zmk -b v3.4.0+zmk-fixes
#
# WIDGET BRANCH ANIMATED
# cmake-args: -DKEYMAP_FILE=../../config/other-corne.keymap -DCONFIG_ZMK_KEYBOARD_NAME=\"other-corne\" -DEXTRA_CONF_FILE=../../config/other-corne.conf
# /Users/marcos/zmk-privat/config/config_ready/nice/oled_rgb/corne.conf
# -DKEYMAP_FILE=../../config/other-corne.keymap -DCONFIG_ZMK_KEYBOARD_NAME=\"other-corne\" -DEXTRA_CONF_FILE=../../config/other-corne.conf
# module:
# https://github.com/caksoylar/zmk-rgbled-widget

### config
# extra_conf_file_oled_rgb= -DEXTRA_CONF_FILE=${PWD}/config/config_ready/nice/oled_rgb/corne.conf
extra_modules_dir=${PWD}
extra_modules= -DZMK_EXTRA_MODULES="/boards"
config=${PWD}/config
nice_mount=/Volumes/NICENANO
puchi_mount=/Volumes/NRF52BOOT
xiao_mount=/Volumes/XIAO-SENSE
zmk_image=zmkfirmware/zmk-dev-arm:3.5
nice=nice_nano_v2
puchi=puchi_ble_v1
xiao=seeeduino_xiao_ble
urob=zmk-codebase_urob
default=zmk-codebase_default
# --name zmk-$@ is for codebase_urob, for example: zmk-codebase_urob
docker_opts= \
	--interactive \
	--tty \
	--name zmk-$@ \
	--workdir /zmk \
	--volume "${config}:/zmk-config:Z" \
	--volume "${PWD}/zmk:/zmk:Z" \
	--volume "${extra_modules_dir}:/boards:Z" \
	${zmk_image}

### name
keyboard_name_nice= '-DCONFIG_ZMK_KEYBOARD_NAME="Nice_Corne_View"'
keyboard_name_nice_oled= '-DCONFIG_ZMK_KEYBOARD_NAME="Nice_Corne_Oled"'
keyboard_name_nice_dongle= '-DCONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle"'
keyboard_name_nice_dongle_oled= '-DCONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_O"'
keyboard_name_nice_dongle_view= '-DCONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_V"'
keyboard_name_puchi_view= '-DCONFIG_ZMK_KEYBOARD_NAME="Puchi_Corne_View"'
keyboard_name_puchi_oled= '-DCONFIG_ZMK_KEYBOARD_NAME="Puchi_Corne_Oled"'
keyboard_name_puchi_dongle= '-DCONFIG_ZMK_KEYBOARD_NAME="Puchi_Dongle"'
keyboard_name_puchi_dongle_oled= '-DCONFIG_ZMK_KEYBOARD_NAME="Puchi_Dongle_O"'
keyboard_name_puchi_dongle_view= '-DCONFIG_ZMK_KEYBOARD_NAME="Puchi_Dongle_V"'
keyboard_name_xiao_dongle= '-DCONFIG_ZMK_KEYBOARD_NAME="Xiao_Dongle"'
keyboard_name_xiao_dongle_oled= '-DCONFIG_ZMK_KEYBOARD_NAME="Xiao_Dongle_O"'
keyboard_name_xiao_dongle_view= '-DCONFIG_ZMK_KEYBOARD_NAME="Xiao_Dongle_V"'

### west
west_built_puchi= \
	    west build /zmk/app \
	    --pristine --board "${puchi}"

west_built_nice= \
	    west build /zmk/app \
	    --pristine --board "${nice}"

west_built_xiao= \
	    west build /zmk/app \
	    --pristine --board "${xiao}"

### shields
shield_settings_reset= \
	    -- -DSHIELD="settings_reset" -DZMK_CONFIG="/zmk-config"
shield_corne_left= \
	    -- -DSHIELD="corne_left" -DZMK_CONFIG="/zmk-config"
shield_corne_right_view= \
	    -- -DSHIELD="corne_right nice_view_adapter nice_view" \
	    -DZMK_CONFIG="/zmk-config"
shield_corne_right= \
	    -- -DSHIELD="corne_right" -DZMK_CONFIG="/zmk-config"
shield_corne_left_view= \
	    -- -DSHIELD="corne_left nice_view_adapter nice_view" \
	    -DZMK_CONFIG="/zmk-config"
shield_xiao_corne_dongle_xiao= \
	    -- -DSHIELD="corne_dongle_xiao" -DZMK_CONFIG="/zmk-config"
shield_xiao_corne_dongle_xiao_dongle_display= \
	    -- -DSHIELD="corne_dongle_xiao dongle_display" \
	    -DZMK_CONFIG="/zmk-config"
shield_xiao_corne_dongle_xiao_rgbled_adapter= \
	    -- -DSHIELD="corne_dongle_xiao rgbled_adapter" \
	    -DZMK_CONFIG="/zmk-config"
shield_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter= \
	    -- -DSHIELD="corne_dongle_xiao dongle_display rgbled_adapter" \
	    -DZMK_CONFIG="/zmk-config"
shield_corne_left_peripheral_view= \
	    -- -DSHIELD="corne_left_peripheral nice_view_adapter nice_view" \
	    -DZMK_CONFIG="/zmk-config"
shield_corne_left_peripheral_oled= \
	    -- -DSHIELD="corne_left_peripheral" \
	    -DZMK_CONFIG="/zmk-config"
shield_corne_dongle_pro_micro= \
	    -- -DSHIELD="corne_dongle_pro_micro" -DZMK_CONFIG="/zmk-config"
shield_corne_dongle_pro_micro_dongle_display= \
	    -- -DSHIELD="corne_dongle_pro_micro dongle_display" -DZMK_CONFIG="/zmk-config"
###  uf2
uf2_copy_puchi_corne_settings_reset=/zmk/build/zephyr/zmk.uf2 \
				    firmware/puchi_corne_settings_reset.uf2
uf2_copy_puchi_corne_left=/zmk/build/zephyr/zmk.uf2 \
			  firmware/puchi_corne_left.uf2
uf2_copy_puchi_corne_right=/zmk/build/zephyr/zmk.uf2 \
			   firmware/puchi_corne_right.uf2
uf2_copy_puchi_corne_left_peripheral_view=/zmk/build/zephyr/zmk.uf2 \
				    firmware/puchi_corne_left_peripheral.uf2
uf2_copy_niceuf2_copy_puchi_corne_dongle_pro_micro=/zmk/build/zephyr/zmk.uf2 \
				    firmware/puchi_corne_dongle_pro_micro.uf2
uf2_copy_puchi_corne_dongle_pro_micro_dongle_display=/zmk/build/zephyr/zmk.uf2 \
				    firmware/puchi_corne_dongle_pro_micro_dongle_display.uf2
uf2_copy_nice_corne_settings_reset=/zmk/build/zephyr/zmk.uf2 \
				   firmware/nice_corne_settings_reset.uf2
uf2_copy_nice_corne_left=/zmk/build/zephyr/zmk.uf2 firmware/nice_corne_left.uf2
uf2_copy_nice_corne_right=/zmk/build/zephyr/zmk.uf2 firmware/nice_corne_right.uf2
uf2_copy_nice_corne_left_peripheral_view=/zmk/build/zephyr/zmk.uf2 \
				    firmware/nice_corne_left_peripheral.uf2
uf2_copy_nice_corne_left_peripheral_oled=/zmk/build/zephyr/zmk.uf2 \
				    firmware/nice_corne_left_peripheral.uf2
uf2_copy_nice_corne_dongle_pro_micro=/zmk/build/zephyr/zmk.uf2 \
				    firmware/nice_corne_dongle_pro_micro.uf2
uf2_copy_nice_corne_dongle_pro_micro_dongle_display=/zmk/build/zephyr/zmk.uf2 \
				    firmware/nice_corne_dongle_pro_micro_dongle_display.uf2
uf2_copy_xiao_corne_dongle_xiao=/zmk/build/zephyr/zmk.uf2 \
				    firmware/xiao_corne_dongle_xiao.uf2
uf2_copy_xiao_corne_settings_reset=/zmk/build/zephyr/zmk.uf2 \
				   firmware/xiao_corne_settings_reset.uf2
uf2_copy_xiao_corne_dongle_xiao_dongle_display=/zmk/build/zephyr/zmk.uf2 \
				    firmware/xiao_corne_dongle_xiao_dongle_display.uf2
uf2_copy_xiao_corne_dongle_xiao_rgbled_adapter=/zmk/build/zephyr/zmk.uf2 \
				    firmware/xiao_corne_dongle_xiao_rgbled_adapter.uf2
uf2_copy_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter=/zmk/build/zephyr/zmk.uf2 \
				    firmware/xiao_corne_dongle_xiao_dongle_display_rgbled_adapter.uf2
### chmod
uf2_chmod_puchi_corne_settings_reset=chmod go+wrx \
				     firmware/puchi_corne_settings_reset.uf2
uf2_chmod_puchi_corne_left=chmod go+wrx firmware/puchi_corne_left.uf2
uf2_chmod_puchi_corne_right=chmod go+wrx firmware/puchi_corne_right.uf2
uf2_chmod_puchi_corne_left_peripheral_view=chmod go+wrx firmware/puchi_corne_left_peripheral.uf2
uf2_chmod_puchi_corne_dongle_pro_micro=chmod go+wrx firmware/puchi_corne_dongle_pro_micro.uf2
uf2_chmod_puchi_corne_dongle_pro_micro_dongle_display=chmod go+wrx firmware/puchi_corne_dongle_pro_micro_dongle_display.uf2
uf2_chmod_nice_corne_settings_reset=chmod go+wrx \
				    firmware/nice_corne_settings_reset.uf2
uf2_chmod_nice_corne_left=chmod go+wrx firmware/nice_corne_left.uf2
uf2_chmod_nice_corne_right=chmod go+wrx firmware/nice_corne_right.uf2
uf2_chmod_nice_corne_left_peripheral_view=chmod go+wrx firmware/nice_corne_left_peripheral.uf2
uf2_chmod_nice_corne_left_peripheral_oled=chmod go+wrx firmware/nice_corne_left_peripheral.uf2
uf2_chmod_nice_corne_dongle_pro_micro=chmod go+wrx firmware/nice_corne_dongle_pro_micro.uf2
uf2_chmod_nice_corne_dongle_pro_micro_dongle_display=chmod go+wrx firmware/nice_corne_dongle_pro_micro_dongle_display.uf2
uf2_chmod_xiao_corne_dongle_xiao=chmod go+wrx firmware/xiao_corne_dongle_xiao.uf2
uf2_chmod_xiao_corne_settings_reset=chmod go+wrx \
				    firmware/xiao_corne_settings_reset.uf2
uf2_chmod_xiao_corne_dongle_xiao_dongle_display=chmod go+wrx firmware/xiao_corne_dongle_xiao_dongle_display.uf2
uf2_chmod_xiao_corne_dongle_xiao_rgbled_adapter=chmod go+wrx firmware/xiao_corne_dongle_xiao_rgbled_adapter.uf2
uf2_chmod_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter=chmod go+wrx firmware/xiao_corne_dongle_xiao_dongle_display_rgbled_adapter.uf2

clone_zmk_default:
	if [ ! -d zmk ]; then git clone https://github.com/zmkfirmware/zmk; fi

codebase_default: clone_zmk_default
	docker run ${docker_opts} sh -c '\
		west init -l /zmk/app/; \
		west update'
clone_zmk_urob:
	if [ ! -d zmk ]; then git clone https://github.com/urob/zmk; fi

codebase_urob: clone_zmk_urob
	docker run ${docker_opts} sh -c '\
		west init -l /zmk/app/; \
		west update'

### CODEBASE_UROB START
only_nice_corne_left_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_left_view} \
		${keyboard_name_nice} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_left}
	${uf2_chmod_nice_corne_left}
only_nice_corne_right_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_right_view} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_right}
	${uf2_chmod_nice_corne_right}
only_puchi_corne_left_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_left_view} \
		${keyboard_name_puchi} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_left}
	${uf2_chmod_puchi_corne_left}
only_puchi_corne_right_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_right} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_right}
	${uf2_chmod_puchi_corne_right}
only_nice_corne_left_peripheral_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_left_peripheral_view} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_view}
	${uf2_chmod_nice_corne_left_peripheral_view}
only_puchi_corne_left_peripheral_view_urob:
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_left_peripheral_view} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_left_peripheral_view}
	${uf2_chmod_puchi_corne_left_peripheral_view}
only_nice_corne_dongle_pro_micro_dongle_display_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_dongle_pro_micro_dongle_display} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro_dongle_display}
	${uf2_chmod_nice_corne_dongle_pro_micro_dongle_display}
only_puchi_corne_dongle_pro_micro_dongle_display_urob:
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_dongle_pro_micro_dongle_display} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_dongle_pro_micro_dongle_display}
	${uf2_chmod_puchi_corne_dongle_pro_micro_dongle_display}
only_corne_xiao_corne_dongle_xiao_dongle_display_urob:
	docker run --rm ${docker_opts} \
		${west_built_xiao} ${shield_xiao_corne_dongle_xiao_dongle_display} ${extra_modules}
	docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_dongle_display}
	${uf2_chmod_xiao_corne_dongle_xiao_dongle_display}
only_nice_settings_reset_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_settings_reset}
	docker cp ${urob}:${uf2_copy_nice_corne_settings_reset}
	${uf2_chmod_nice_corne_settings_reset}
only_puchi_settings_reset_urob:
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_settings_reset}
	docker cp ${urob}:${uf2_copy_puchi_corne_settings_reset}
	${uf2_chmod_puchi_corne_settings_reset}
only_xiao_settings_reset_urob:
	docker run --rm ${docker_opts} \
		${west_built_xiao} ${shield_settings_reset}
	docker cp ${urob}:${uf2_copy_xiao_corne_settings_reset}
	${uf2_chmod_xiao_corne_settings_reset}

### MC: TODO: excluded for the moment START
only_corne_left_peripheral_oled_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_left_peripheral_oled} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_oled}
	${uf2_chmod_nice_corne_left_peripheral_oled}
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_left_peripheral_oled} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_left_peripheral_oled}
	${uf2_chmod_puchi_corne_left_peripheral_oled}
only_corne_dongle_pro_micro_urob:
	docker run --rm ${docker_opts} \
		${west_built_nice} ${shield_corne_dongle_pro_micro} ${extra_modules}
	docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro}
	${uf2_chmod_nice_corne_dongle_pro_micro}
	docker run --rm ${docker_opts} \
		${west_built_puchi} ${shield_corne_dongle_pro_micro} ${extra_modules}
	docker cp ${urob}:${uf2_copy_puchi_corne_dongle_pro_micro}
	${uf2_chmod_puchi_corne_dongle_pro_micro}
only_corne_xiao_corne_dongle_xiao_urob:
	docker run --rm ${docker_opts} \
		${west_built_xiao} ${shield_xiao_corne_dongle_xiao} ${extra_modules}
	docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao}
	${uf2_chmod_xiao_corne_dongle_xiao}
### MC: TODO: excluded for the moment END

### MC: rgbled_adapter TODO: START
only_corne_xiao_corne_dongle_xiao_rgbled_adapter_urob:
	docker run --rm ${docker_opts} \
		${west_built_xiao} ${shield_xiao_corne_dongle_xiao_rgbled_adapter} ${extra_modules}
	docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_rgbled_adapter}
	${uf2_chmod_xiao_corne_dongle_xiao_rgbled_adapter}
only_corne_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter_urob:
	docker run --rm ${docker_opts} \
		${west_built_xiao} ${shield_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter} ${extra_modules}
	docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter}
	${uf2_chmod_xiao_corne_dongle_xiao_dongle_display_rgbled_adapter}
### MC: rgbled_adapter TODO: END

only_corne_left_view_urob: only_nice_corne_left_view_urob \
	only_puchi_corne_left_view_urob
only_corne_right_view_urob: only_nice_corne_right_view_urob \
	only_puchi_corne_right_view_urob
only_corne_left_peripheral_view_urob: only_nice_corne_left_peripheral_view_urob \
	only_puchi_corne_left_peripheral_view_urob
only_corne_dongle_pro_micro_dongle_display_urob: only_nice_corne_dongle_pro_micro_dongle_display_urob \
						only_puchi_corne_dongle_pro_micro_dongle_display_urob
settings_reset_urob: only_nice_settings_reset_urob \
	only_puchi_settings_reset_urob \
	only_xiao_settings_reset_urob
corne_urob: only_corne_left_view_urob \
	only_corne_right_view_urob \
	only_corne_left_peripheral_view_urob \
	only_corne_dongle_pro_micro_dongle_display_urob \
	only_corne_xiao_corne_dongle_xiao_dongle_display_urob \
	settings_reset_urob
### CODEBASE_UROB END

# Open a shell within the ZMK environment
shell:
	docker run --rm ${docker_opts} /bin/bash

# Flash the appropriate firmware to the bootloader
nice_corne_flash_left:
	@ printf "Waiting for ${nice} bootloader to appear at ${nice_mount}.."
	@ while [ ! -d ${nice_mount} ]; do sleep 1; printf "."; done; printf "\n"
	cp -av firmware/nice_corne_left.uf2 ${nice_mount}

nice_corne_flash_right:
	@ printf "Waiting for ${nice} bootloader to appear at ${nice_mount}.."
	@ while [ ! -d ${nice_mount} ]; do sleep 1; printf "."; done; printf "\n"
	cp -av firmware/nice_corne_right.uf2 ${nice_mount}

puchi_corne_flash_left:
	@ printf "Waiting for ${puchi} bootloader to appear at ${puchi_mount}.."
	@ while [ ! -d ${puchi_mount} ]; do sleep 1; printf "."; done; printf "\n"
	cp -av firmware/puchi_corne_left.uf2 ${puchi_mount}

puchi_corne_flash_right:
	@ printf "Waiting for ${puchi} bootloader to appear at ${puchi_mount}.."
	@ while [ ! -d ${puchi_mount} ]; do sleep 1; printf "."; done; printf "\n"
	cp -av firmware/puchi_corne_right.uf2 ${puchi_mount}

clean_firmware:
	find firmware/*.uf2 -type f -delete

clean_zmk:
	if [ -d zmk ]; then rm -rfv zmk; fi

clean: clean_zmk
	docker ps -aq --filter name='^zmk' | xargs -r docker container rm
	docker volume list -q --filter name='zmk' | xargs -r docker volume rm

clean_all: clean clean_firmware
	@echo "cleaning all"

# vim: set ft=make fdm=marker:


================================================
FILE: README.md
================================================
# MC Technology's zmk-config for corne - sofle - lily58

[![MC Technology](https://github.com/mctechnology17/mctechnology17/blob/main/src/mctechnology_extendido.GIF)](https://www.youtube.com/channel/UC_mYh5PYPHBJ5YYUj8AIkcw)

<div align="center">

  [<img align="center" alt="MC Technology | YouTube" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/youtube.png" />][youtube]
  [<img align="center" alt="MC Technology17 | Facebook" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/facebook.png" />][facebook]
  [<img align="center" alt="MC Technology17 | Reddit" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/reddit.png" />][reddit]

</div>
<br>


- [INTRO](#INTRO)
- [QUICK START](#QUICK-START)
  - [keymap corne](#keymap-corne)
  - [keymap sofle](#keymap-sofle)
  - [keymap splitkb_aurora_sofle](#keymap-splitkb_aurora_sofle)
  - [keymap lily58](#keymap-lily58)
- [LOCAL INSTALLATION](#LOCAL-INSTALLATION)
- [DISPLAY](#DISPLAY)
- [RGB](#RGB)
  - [rgb with niceview](#rgb-with-niceview)
  - [rgb with niceview in two step](#rgb-with-niceview-in-two-step)
- [DONGLE](#DONGLE)
- [USEFUL TIPS](#USEFUL-TIPS)
- [ZMK STUDIO](#ZMK-STUDIO)
- [MODULE INTEGRATION](#MODULE-INTEGRATION)
   - [modules used in this repository](#modules-used-in-this-repository)
   - [list of useful modules](#list-of-useful-modules)
- [THIS REPOSITORY AS A MODULE](#THIS-REPOSITORY-AS-A-MODULE)
- [INSPIRATIONS](#INSPIRATIONS)
- [MY OTHER PROJECTS](#MY-OTHER-PROJECTS)
- [RELATED PROJECTS](#RELATED-PROJECTS)
- [DONGLE DESIGNS](#DONGLE-DESIGNS)

----

- If you already have your corne - sofle - lily58 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 - sofle - lily58 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/).

- If you already have a repository and you want only the dongle option of this repository with support for `zmk-studio`, just add this repository as a module to your configuration, look the section [THIS REPOSITORY AS A MODULE](#THIS-REPOSITORY-AS-A-MODULE).

# INTRO

> [!CAUTION]
>
> I AM NOT RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE, USE IT AT YOUR OWN
> RISK.

> [!NOTE]
>
>
> FEEL FREE TO MODIFY THE CODE TO YOUR LIKING OR USE WHATEVER YOU NEED. I
> DECIDED TO REVOKE MANY CHANGES AND RETURN TO THE BASE MAPPING, SO THAT
> ADVANCED AND NON-ADVANCED  USERS CAN USE THIS REPOSITORY AS A BASE FOR THEIR
> CONFIGURATIONS. IF YOU HAVE ANY QUESTIONS, DON'T HESITATE TO ASK. IF YOU HAVE
> ANY SUGGESTIONS, FEEL FREE TO SUGGEST.


The objective of this repository is to serve as a base for configuring your
corne - sofle - lily58 keyboard with the firmware [ZMK firmware] in a simple and fast way.
without having to configure everything from scratch. Many of us are fascinated
by customizing our keyboards, but sometimes we don't have the time or
experience to do it. That is why I have decided to create this repository so
that you can have a base configuration and you can modify it to your liking.

This base includes the most recent corne - sofle - lily58 configurations, featuring a setup for
the corne - sofle - lily58 dongle with/without an OLED screen.
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
peripherals), **[nice_nano_v2]** (used as a dongle and as peripherals),
**clones of nice_nano_v2** (used as a dongle and as peripherals), and the
**[seeeduino_xiao_ble]** (used only as a dongle).

| Main Pros                                                                                       |
|-------------------------------------------------------------------------------------------------|
| mobility and flexibility                                                                        |
| reduction of tension and fatigue (ergonomic and ortholinear)                                    |
| improved productivity                                                                           |
| bluetooth and usb-c connection                                                                  |
| Highly customizable programmable with [ZMK firmware].                                           |
| compatibility with linux, windows, macos, android, ios and more                                 |
| completely wireless between the two halves and with the PC                                      |
| ultra-low consumption. extends battery life to the limit                                        |
| drag and drop thanks to the included uf2 bootloader                                             |
| no additional software required for flashing                                                    |
| support for multiple devices (up to 5)                                                          |
| mouse keys                                                                                      |
| rgb                                                                                             |
| macros                                                                                          |
| tap dance                                                                                       |
| combos                                                                                          |
| up to 1 week of use without charger (with 100mah)                                               |
| support [nice-view] screen and oled screen                                                      |
| online editor for keymap. see               [keymap-editor]                                     |
| 100% open source                                                                                |
| support for puchi-ble dongle, nice!nano v2, nice!nano v2 clones, seeeduino xiao ble and more... |
| support with dongle with display 128x32, 128x64 and 128x128                                     |
| and more...                                                                                     |

# QUICK START
> [!NOTE]
>
> 1. With this configuration you can use the corne - sofle - lily58 keyboard practically
> immediately, you just have to follow the following steps and that's it.
>
> 2. If you need precompiled files you can download them from the [firmware
>    folder](./firmware)
>
> 3. If you have any problems, you just have to flash the reset firmwares that
>    are in the [firmware](./firmware) folder and that's it.
>
> 4. Disable the builds you don't need in the file [build.yaml](./build.yaml),
>    by default they are all activated.


### zmk-studio (quick start)
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: [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
     scroll to the bottom and click)
   - Here is something called artifacts, click to download the file, it is a .zip
   - now go to download on your computer (or wherever you have downloads by default):
   - 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)
   - 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)
   - 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]
8. Enjoy your new keyboard

Here you can see the visual changes to the configuration:
> [!NOTE]
>
> This .svg image is automatically generated every time a change is made with
> the keymap editor. Github's workflows are responsible for building and
> generating the .svg file. You just have to go to the
> [keymap-drawer](./keymap-drawer)  folder and open the .svg file with your
> preferred browser if you want to see the files. The keymap-drawer
> configuration file is located in
> [config](./config/config_keymap-drawer.yaml).
> The file for the workflows is in [workflows](./.github/workflows/keymap-drawer.yaml) in case you want to modify it.

## keymap corne
[![keymap-drawer-demo-corne](keymap-drawer/corne.svg)](https://www.youtube.com/c/mctechnology17)
## keymap sofle
[![keymap-drawer-demo-sofle](keymap-drawer/sofle.svg)](https://www.youtube.com/c/mctechnology17)
## keymap splitkb_aurora_sofle
[![keymap-drawer-demo-splitkb_aurora_sofle](keymap-drawer/splitkb_aurora_sofle.svg)](https://www.youtube.com/c/mctechnology17)
## keymap lily58
[![keymap-drawer-demo-lily58](keymap-drawer/lily58.svg)](https://www.youtube.com/c/mctechnology17)

If you want to customize this image with shapes/colors/etc. You can see these references:
[^1] [^2] [^3]


# LOCAL INSTALLATION
Before making any modifications, please see the [ZMK documentation]
documentation.

Example of an advanced configuration hier -> [^4]

1. Clone _your fork_ of this repository.

   ```bash
   # Replace `mctechnology17` with your username
   git clone https://github.com/mctechnology17/zmk-config.git
   ```

2. Enter the repository.

   ```bash
   cd zmk-config
   ```

Here you have a preview of how the repository is organized:

```bash
zmk-config # main folder
├── LICENSE # license
├── Makefile # file for compilation
├── README.md # readme this file
├── build.yaml # config file for compilation on the github server
│   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
│   ├── keymap_german_mac_iso_zmk.h # example of definition for german mac iso
│   └── west.yml # conf to connect with the repository
├── firmware
│   └── *.uf2 # all the firmwares
├── keymap-drawer # folder with the keymap-drawer
│   ├── corne.svg # img of the keymap
│   └── corne.yaml # keymap file yaml format for keymap-drawer
└── src
    └── ... # other files
```

To compile with make, just run the following command:

> [!IMPORTANT]
>
> 1. You have to have [docker](https://www.docker.com/products/docker-desktop/)
>    installed on your computer to use this command.
> 2. Check the [makefile](./makefile) file for build options.


```bash
make codebase_urob # clones urob's zmk firmware and initializes it
make corne_urob # compile all the *.uf2 of the corne and copy them to the firmware folder
```

# DISPLAY
1. ePAPER
   - The nice!view is a SSD1306 OLED replacement boasting >1,000x power savings
     while keeping a 30Hz refresh rate. It has a similar pinout to SSD1306
     OLEDs with one extra pin making it easy to add on to existing boards.
   - the [nice-view] screen is compiled by default in this repository.
2. OLED
   - SSD1306 / sh1107 / sh1106 OLED displays are one of the most common in
     mechanical keyboard kits. They're often used to display information about
     your keyboard, such as which layer is active, or if any modifiers like
     Caps Lock, Num Lock or Scroll Lock are on. Of course, you can display
     anything you want, including images and animations.
   - These displays work over I2C and should be powered with 5V. They are
     compatible with Pro Micro-based kits.
   - the oled screen for the dongle is enabled by default in this repository.
   - If you want to enable the OLED screen for the halves, you can do so by
     modifying the `.conf` files for their respective halves.
   - Remember to disable the [nice-view] screens to avoid conflict in the compilation.
3. FULL COLOR LCD SCREEN
   - [Prospector](https://github.com/carrefinho/prospector) is a desktop ZMK dongle with full color LCD screen.

> [!IMPORTANT]
>
> 1. To modify the dongle's OLED screen you can modify the `.overlay` file as follows for its respective board:
[corne_dongle_xiao.overlay](./config/boards/shields/corne/corne_dongle_xiao.overlay) and
[corne_dongle_pro_micro.overlay](./config/boards/shields/corne/corne_dongle_pro_micro.overlay). There you can find as a comment examples for the 128x32, 128x64, 128x128 screens and [nice-view] for the dongle screen.
> 3. For the 128x128 OLED screen model sh1107 there are no default drivers in Zephyr, so neither in ZMK, but you can add it yourself with this small tutorial (This tutorial is the same for the OLED screens mentioned above):

You just have to modify the following line:
```dts
// replace the following lines for the 128x64 screen by default
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// for this (i.e. just copy and paste) replace the 128x64 screen with the 128x128 sh1107 screen
&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

```

# RGB
> [!WARNING]
>
> 1. If you use [nice-view] you cannot use rgb, since [nice-view] uses the same
>    pinout as rgb.

If you are interested in using RGB on your keyboard you can see the
configuration in the branch
[power/domains-and-device-runtime](https://github.com/mctechnology17/zmk-config/tree/power/domains-and-device-runtime)
from this same repository.

Here is an example of what it looks like:
[![rgb-demo](src/demo.GIF)](https://www.youtube.com/c/mctechnology17)

## rgb with niceview
Points to take into account if you want to use niceview with RGB:
- In a nutshell, the problem is that the backlight and the nice!view display
  use the same pin on the pcb, causing conflicts.
- The common solution is to solder the backlight to pin 008 and set it to the keymap.
- However, this means that both the screen and backlight share the same power
  source, which can drain the battery quickly.
- There is no ideal solution, but some options include redesigning the boards
  to separate the power or powering the display directly from a gpio pin.

## rgb with niceview in two step
1. solder the nice!view display to pin 008
2. set the display to use pin 008 in the keymap
3. recompile the firmware and enjoy the nice!view display with RGB
```c
&nice_view_spi {
    cs-gpios = <&pro_micro 0 GPIO_ACTIVE_HIGH>;  // use D0 (008) for CS (no 006)
};
```

# DONGLE
> [!TIP]
>
> 1. You can connect the display to the dongle directly to the i2c port of the
> handwired style dongle, or you can connect it to a usb-c port of the pcb
> style dongle.
> 2. You can see the connections in the following diagram for [seeeduino_xiao_ble](./src/pinout-seeeduino_xiao_ble.png) and for the boards with [pro_micro](./src/pinout-pro_micro.png) connections as the [nice_nano_v2] and the [puchi_ble_v1].
> 3. You can print a case for the dongle, you can see the designs below in the section [Dongle Designs](#Dongle-Designs).
> 4. You can print a pcb for the dongle, you can see the designs in the section [Dongle Designs](#Dongle-Designs).
> 5. You can program a macro that references the `&bootloader` action so that the dongle enters bootloader mode and you can flash the firmware again. The macros are executed on the master so this action causes the dongle to enter bootloader mode. Thanks @chadtrans for the tip!

In the following image you can see how you can connect the OLED screen to the
dongle:
[![dongle-demo](src/dongle.jpg)](https://www.youtube.com/c/mctechnology17)

Information about this image:
- The photo shows a [seeeduino_xiao_ble] dongle with an OLED 128x128 sh1107 display connected to the handwired style i2c port. This dongle acts as master.
- The left side acts as peripheral in this case, the board is a [puchi_ble_v1].
- The right side acts as a peripheral in this case, the board is a [nice_nano_v2].
- The photo shows a clone [nice_nano_v2] dongle with an OLED display connected to a traditional i2c port in a pcb style. This dongle is only for sample photo and is not connected to any device shown in the photo.

Combo example to enter bootloader mode. On  your
[corne.keymap](./config/corne.keymap) file you can add the following combo (Thanks @VictorSCamargo for the tip!):
> [!TIP]
>
> 1. You can program this `combo` with the online editor [keymap-editor]
> 2. These examples were tested using a `corne` keyboard, so the numbers `0 1 2` correspond to the keys on the left of the first row of the keyboard and the numbers `9 10 11` correspond to the 3 right keys at the top of columns 3, 4 and 5. see the reference below `COMBO` for more details.
> 3. You can combine both forms of combos and in both cases the keyboard that is the master (dongle or central) is the one that executes the action, in this case the dongle or the left master enters bootloader mode.

1. This is the manual way to do it using `c` code:

```c
// this is the manual way to do it
#define COMBO(NAME, BINDINGS, KEYPOS, LAYERS) \
    combo_##NAME { \
        bindings = <BINDINGS>; \
        key-positions = <KEYPOS>; \
        layers = <LAYERS>; \
    };
// for the right side
// COMBO NAME = combo_bootloader_right,
// BINDINGS = &bootloader,
// KEYPOSITION = 9 10 11,
// LAYERS = 0
COMBO(combo_bootloader_right,        &bootloader,     9 10 11,           0);
```

2. This is the manual way to do it using `dts` code:

```dts
// for the left side
combo_bootloader_left {
        timeout-ms = <50>;
        key-positions = <0 1 2>; // Pressing the 3 first keys on the keyboard will trigger &bootloader
        bindings = <&bootloader>;
        };
   };
```

# USEFUL TIPS
> [!TIP]
>
> Below are some useful tips for using your corne - sofle - lily58 keyboard with this
> configuration.

- You can add a reset key on each half, that's useful for when your halves disconnect/desynchronize, or something unusual happens. That way the firmware is loaded again. see reference in [corne.keymap](./config/corne.keymap)
- You can add a bootloader activator on each half in case you don't have access to the bootloader button, it is useful in case your case is not optimized or you just want that option. see reference in [corne.keymap](./config/corne.keymap)
- If both halves were disconnected/unsynchronized, you just have to press the reset button on both halves 10 times in a row and they will reconnect.
- If you want to flash the firmware again you just have to connect the keyboard (that is, one half first, usually the left one) press the reset button 2 times in a row
  and your device is recognized as a hard disk storage drive, then just drag the file to flash and that's it. do the same with the other half.
- Remember that if your corne - sofle - lily58 only has some functional RGB lights you can activate only the ones that you have functional, it is not necessary to activate all the lights. see reference in [led strip](./config/corne.keymap)
- You can combine the boards, for example: on the left you can have a [nice_nano_v2], on the right a [puchi_ble_v1] and on the dongle a [seeeduino_xiao_ble] or some clone [nice_nano_v2], or any combination you can think of.

# 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. Remember that animations consume energy, so if you want to conserve your battery, turn off the animations!
> 2. Please consult the documentation of each module that you are going to use, here I leave you the links for each one.

## modules used in this repository
See module details here for more information and more configurations:
- [**nice_view_gem**](https://github.com/M165437/nice-view-gem) a sleek customization for the nice!view shield
- [**nice_oled**](https://github.com/mctechnology17/zmk-nice-oled) vertical widgets for oled screens with zmk for split and non-split keyboards using the standard [oled screen](https://keycapsss.com/keyboard-parts/parts/80/0.91-oled-lcd-display-128x32-ssd1306-i2c) 128x32.
- [**zmk-dongle-display**](https://github.com/englmaxi/zmk-dongle-display) to show the peripheral battery percentage (and more!) on the display of the dongle.
- [**dongle_display!view**](https://github.com/mctechnology17/zmk-dongle-display-view) to show the peripheral battery percentage (and more!) on the display of the dongle using the nice!view display.
- [**oled Adapter**](https://github.com/mctechnology17/zmk-oled-adapter) to use the 128x32, 128x64 and 128x128 OLED screens on keyboards with ZMK without having to modify the shields of the keyboards.

## list of useful modules
Additional features are provided by the following [modules](https://zmk.dev/docs/features/modules):

- [**zmk-antecedent-morph**](https://github.com/ssbb/zmk-antecedent-morph) to change the behavior of a key based on the previously pressed key. This is used to type `<=`, `>=`, `!=`, `=>`, `->`, `|>`, `./` and `#include ` more comfortably.
- [**zmk-locales**](https://github.com/joelspadin/zmk-locales) to provide key codes for non-US keyboard locales.
- [**zmk-rgbled-widgets**](https://github.com/caksoylar/zmk-rgbled-widget) to show the connection and battery status with the built-in LEDs of the Xiao BLE controller.
- [**zmk-led_indicator**](https://github.com/englmaxi/zmk-config/tree/main/boards/shields/led_indicator) to show the connection and battery status with the built-in LEDs to be used with the single LED of the nice!nano. Based on the [**zmk-rgbled-widgets**](https://github.com/caksoylar/zmk-rgbled-widget)
- [**zmk-tri-state**](https://github.com/urob/zmk-tri-state) to define a custom <kbd>swapper</kbd> and a <kbd>select-word</kbd> behavior.
- [**zmk-layer-listeners**](https://github.com/ssbb/zmk-layer-listeners) - call something on layer enter/leave. I use it for haptic feedback and to reset nav layer toggled keys on leave.
- [**zmk-deadkey-slayer**](https://github.com/ssbb/zmk-deadkey-slayer) - drop invalid keycodes. I use them quite a lot as a markers, way to reset sticky keys, etc. so they aren't sent to the host (in which case eg MacOS disconnects device after some limit)
- [**zmk-raw-hid**](https://github.com/zzeneg/zmk-raw-hid) - raw HID - Custom nice!view widget that adds time, layout and volume information. This data is received from host computer with companion app over HID interface (aka Raw HID from QMK).
- [**zmk-nice-view-hid**](https://github.com/zzeneg/zmk-nice-view-hid) - Custom nice!view widget that adds time, layout and volume information. This data is received from host computer with companion app over HID interface (aka Raw HID from QMK).
- [**zmk-hid-host**](https://github.com/zzeneg/qmk-hid-host) - HID host - Custom nice!view widget that adds time, layout and volume information. This data is received from host computer with companion app over HID interface (aka Raw HID from QMK).

# THIS REPOSITORY AS A MODULE
1. In the `config/west.yml` file, add a new remote and its related project.
```yaml
manifest:
  remotes:
    - name: zmkfirmware
      url-base: https://github.com/zmkfirmware
    # include corne with dongle pro_micro and xiao compatible
    - name: mctechnology17
      url-base: https://github.com/mctechnology17
  projects:
    - name: zmk
      remote: zmkfirmware
      revision: main
      import: app/west.yml
    # include corne with dongle pro_micro and xiao compatible
    - name: zmk-config
      remote: mctechnology17
      revision: main
  self:
    path: config
```

2. In the `build.yaml` file, add the `corne_dongle_pro_micro` or the `corne_dongle_xiao` shield.

```yaml
---
include:
  # example with xiao dongle without display
  - board: seeeduino_xiao_ble
    shield: corne_dongle_xiao
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\" -DCONFIG_ZMK_STUDIO=y
    artifact-name: xiao_corne_dongle_xiao
    snippet: studio-rpc-usb-uart
  # ... the rest of the shields
```

3. Build the firmware, flash it to your keyboard, and enjoy!

# INSPIRATIONS

- [englmaxi/zmk-config](https://github.com/englmaxi/zmk-config)
- [caksoylar/zmk-config](https://github.com/caksoylar/zmk-config)
- [joelspadin/zmk-locale-generator](https://github.com/joelspadin/zmk-locale-generator)
- [minusfive/zmk-config](https://github.com/minusfive/zmk-config)
- [infused-kim/zmk-config](https://github.com/infused-kim/zmk-config)
- [urob/zmk-config](https://github.com/urob/zmk-config)

# MY OTHER PROJECTS:
- [nice!oled](https://github.com/mctechnology17/zmk-nice-oled): nice_oled
  vertical widgets for oled screens with zmk (for split and non-split
  keyboards)
- [dongle_display!view](https://github.com/mctechnology17/zmk-dongle-display-view): This is a mix between display_dongle and nice!view that allows you to use the nice!view display with your dongle.
- [oled_adapter](https://github.com/mctechnology17/zmk-oled-adapter): This
  module is an adapter for 128x32, 128x64 and 128x128 OLED screens, to be used
  on keyboards with ZMK without having to modify the shields of the keyboards.
- [qmk-config] will be updated soon
- [qmk_userspace] will be updated soon
- [vimtools] swiss army knife for vim (features and settings that will make your life easier)
- [gm] cross-platform git manager with friendly user interface
- [vim-better-header] the best automated template
- [vim-executor] multilanguage code executor

If you enjoy my contributions, feel free to donate. I appreciate if you follow me on [github] and [youtube]
- [paypal]
- [sponsor]

# RELATED PROJECTS

I used this project as a reference to configure the dongles with OLED screen:
- [cygnus](https://github.com/rain2813/zmk-cygnus-oled.git) by @rain2813
- [zmk keyboard Macintosh dongle display](https://makerworld.com/en/models/403660) by @rain2813
- [corne with dongle](https://github.com/tomgroenwoldt/zmk-config.git) by @tomgroenwoldt
- [zmk-dongle-display](https://github.com/englmaxi/zmk-dongle-display.git) by @englmaxi
- [zmk-config for module](https://github.com/englmaxi/zmk-config/tree/master/boards/shields) by @englmaxi
- [zmk-config for dongle pro micro](https://github.com/joaopedropio/zmk-swoop/tree/dongle-sdd1306) by @joaopedropio

In the following animations created by @englmaxi you can see what the dongle
looks like with the 128x64 OLED screen:

![output](https://github.com/englmaxi/zmk-config/assets/43675074/8d268f23-1a4f-44c3-817e-c36dc96a1f8b)

In that animation you can see the connection or output with the computer, that
is, if it is through a USB or Bluetooth port. Also information about the status
of both batteries.

![mods](https://github.com/englmaxi/zmk-config/assets/43675074/af9ec3f5-8f61-4629-abed-14ba0047f0bd)

In this animation you can see the actions of the modifier keys, such as
control, shift, alt, windows/mac, etc.

# DONGLE DESIGNS
- [case1](https://github.com/englmaxi/zmk-dongle-display/raw/main/cases/case1.zip) by @englmaxi
- [case2](https://github.com/englmaxi/zmk-dongle-display/raw/main/cases/case2.zip) by @englmaxi
- [Cyberdeck](https://github.com/rafaelromao/keyboards/tree/main/stls/Dongle) by @rafaelromao
- [Dongle PCB](https://github.com/spe2/zmk_dongle_hardware) by @spe2
- [Macintosh](https://makerworld.com/en/models/403660) by @rain2813
- [Redox](https://makerworld.com/en/models/242951) by @rurounikexin
- [ZMK Display Dongle](https://makerworld.com/en/models/496738) by @yingeling

An example of Dongle Designs (by @rain2813):
[![dongle-designs-demo](src/macintosh.png)](https://www.youtube.com/c/mctechnology17)

# 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/
[^4]: Urob zmk-config, https://github.com/urob/zmk-config
[^5]: Urob ZMK Firmware: Personal fork, https://github.com/urob/zmk/

[qmk-config]: https://github.com/mctechnology17/qmk-config
[qmk_userspace]: https://github.com/mctechnology17/qmk_userspace
[github]: https://github.com/mctechnology17
[twitter]: https://twitter.com/mctechnology17
[youtube]: https://www.youtube.com/c/mctechnology17
[instagram]: https://www.instagram.com/mctechnology17/
[facebook]: https://m.facebook.com/mctechnology17/
[reddit]: https://www.reddit.com/user/mctechnology17
[nice-view]: https://nicekeyboards.com/nice-view
[puchi_ble_v1]: (https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller-pro-micro-replacement?number=KC10157_SWITCH&c=18)
[seeeduino_xiao_ble]: (https://keycapsss.com/keyboard-parts/mcu-controller/212/seeed-studio-xiao-nrf52840-rp2040-esp32c3?number=KC10167_NRF)
[nice_nano_v2]: (https://nicekeyboards.com/nice-nano)
[keymap-editor]: https://nickcoutsos.github.io/keymap-editor/
[ZMK firmware]: https://github.com/zmkfirmware/zmk/
[ZMK documentation]: https://zmk.dev/docs/user-setup
[ZMK keycodes]: https://zmk.dev/docs/codes
[ZMK Discord]: https://zmk.dev/community/discord/invite
[git]: (https://github.com/git-guides/install-git)

[vim-executor]: https://github.com/mctechnology17/vim-executor
[vim-better-header]: https://github.com/mctechnology17/vim-better-header
[gm]: https://github.com/mctechnology17/gm
[vimtools]: https://github.com/mctechnology17/vimtools
[jailbreakrepo]: https://mctechnology17.github.io/
[uiglitch]: https://repo.packix.com/package/com.mctechnology.uiglitch/
[uiswitches]: https://repo.packix.com/package/com.mctechnology.uiswitches/
[uibadge]: https://repo.packix.com/package/com.mctechnology.uibadge/
[youtuberepo]: https://github.com/mctechnology17/youtube_repo_mc_technology
[sponsor]: https://github.com/sponsors/mctechnology17
[paypal]: https://www.paypal.me/mctechnology17
[readline]: https://github.com/PowerShell/PSReadLine/blob/master/README.md


================================================
FILE: boards/nice_nano.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/nice_nano_v2.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/nrfmicro_11.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi1_default: spi1_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi1_sleep: spi1_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&spi1 {
    compatible = "nordic,nrf-spim";
    status = "okay";

    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/nrfmicro_11_flipped.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi1_default: spi1_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi1_sleep: spi1_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&spi1 {
    compatible = "nordic,nrf-spim";
    status = "okay";

    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/nrfmicro_13.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi1_default: spi1_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi1_sleep: spi1_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&spi1 {
    compatible = "nordic,nrf-spim";
    status = "okay";

    pinctrl-0 = <&spi1_default>;
    pinctrl-1 = <&spi1_sleep>;
    pinctrl-names = "default", "sleep";

    led_strip: ws2812@0 {
        compatible = "worldsemi,ws2812-spi";
        // label = "WS2812";

        /* SPI */
        reg = <0>; /* ignored, but necessary for SPI bindings */
        spi-max-frequency = <4000000>;

        /* WS2812 */
        chain-length = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};

// vim: filetype=dts fdm=marker:


================================================
FILE: boards/puchi_ble_v1.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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";
        // label = "WS2812";

        /* SPI */
        reg = <0>; /* ignored, but necessary for SPI bindings */
        spi-max-frequency = <4000000>;

        /* WS2812 */
        chain-length = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/seeeduino_xiao_ble.overlay
================================================
/*
ref: For future reference, this pinout shows both pin numberings https://files.seeedstudio.com/wiki/XIAO-BLE/pinout2.png
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
*/
#include <dt-bindings/led/led.h>

&pinctrl {
    spi0_default: spi0_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 29)>;
        };
    };

    spi0_sleep: spi0_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 29)>;
            low-power-enable;
        };
    };
};

&spi3 {
    compatible = "nordic,nrf-spim";
    status = "okay";

    pinctrl-0 = <&spi0_default>;
    pinctrl-1 = <&spi0_sleep>;
    pinctrl-names = "default", "sleep";

    led_strip: ws2812@0 {
        compatible = "worldsemi,ws2812-spi";
        // label = "WS2812";

        /* SPI */
        reg = <0>; /* ignored, but necessary for SPI bindings */
        spi-max-frequency = <4000000>;

        /* WS2812 */
        chain-length = <27>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/corne/Kconfig.defconfig
================================================
if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
    default "Corne"

config ZMK_SPLIT_ROLE_CENTRAL
    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_LEFT_PERIPHERAL || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO

config ZMK_SPLIT
    default y

if ZMK_DISPLAY

config I2C
    default y

config SSD1306
    default y

if SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
    default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

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 # LVGL

endif


================================================
FILE: boards/shields/corne/Kconfig.shield
================================================
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT

config SHIELD_CORNE_LEFT
    def_bool $(shields_list_contains,corne_left)

config SHIELD_CORNE_RIGHT
    def_bool $(shields_list_contains,corne_right)

config SHIELD_CORNE_DONGLE_XIAO
    def_bool $(shields_list_contains,corne_dongle_xiao)

config SHIELD_CORNE_LEFT_PERIPHERAL
    def_bool $(shields_list_contains,corne_left_peripheral)

config SHIELD_CORNE_DONGLE_PRO_MICRO
    def_bool $(shields_list_contains,corne_dongle_pro_micro)


================================================
FILE: boards/shields/corne/boards/nice_nano.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/corne/boards/nice_nano_v2.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/corne/corne.conf
================================================
# Uncomment the following lines to enable the Corne RGB Underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y

# Uncomment the following line to enable the Corne OLED Display
# CONFIG_ZMK_DISPLAY=y


================================================
FILE: boards/shields/corne/corne.dtsi
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#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,physical-layout = &foostan_corne_6col_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <12>;
        rows = <4>;
// | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |   | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |
// | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |   | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |   | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
//                      | SW19 | SW20 | SW21 |   | SW21 | SW20 | SW19 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    five_column_transform: keymap_transform_1 {
        compatible = "zmk,matrix-transform";
        columns = <10>;
        rows = <4>;
// | 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 |
        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)
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)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    kscan0: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";
        row-gpios
            = <&pro_micro 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            ;

    };

    // TODO: per-key RGB node(s)?
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


================================================
FILE: boards/shields/corne/corne.keymap
================================================
// #include "../../../corne.keymap"

/*
 * Copyright (c) 2020 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>

/ {
        keymap {
                compatible = "zmk,keymap";

                default_layer {
// -----------------------------------------------------------------------------------------
// |  TAB |  Q  |  W  |  E  |  R  |  T  |   |  Y  |  U   |  I  |  O  |  P  | BKSP |
// | CTRL |  A  |  S  |  D  |  F  |  G  |   |  H  |  J   |  K  |  L  |  ;  |  '   |
// | SHFT |  Z  |  X  |  C  |  V  |  B  |   |  N  |  M   |  ,  |  .  |  /  | ESC  |
//                    | GUI | LWR | SPC |   | ENT | RSE  | ALT |
                        bindings = <
   &kp TAB   &kp Q &kp W &kp E &kp R &kp T   &kp Y &kp U  &kp I     &kp O   &kp P    &kp BSPC
   &kp LCTRL &kp A &kp S &kp D &kp F &kp G   &kp H &kp J  &kp K     &kp L   &kp SEMI &kp SQT
   &kp LSHFT &kp Z &kp X &kp C &kp V &kp B   &kp N &kp M  &kp COMMA &kp DOT &kp FSLH &kp ESC
                  &kp LGUI &mo 1 &kp SPACE   &kp RET &mo 2 &kp RALT
                        >;
                };
                lower_layer {
// -----------------------------------------------------------------------------------------
// |  TAB |  1  |  2  |  3  |  4  |  5  |   |  6  |  7  |  8  |  9  |  0  | BKSP |
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 |   | LFT | DWN |  UP | RGT |     |      |
// | SHFT |     |     |     |     |     |   |     |     |     |     |     |      |
//                    | GUI |     | SPC |   | ENT |     | ALT |
                        bindings = <
   &kp TAB    &kp N1       &kp N2       &kp N3       &kp N4       &kp N5         &kp N6   &kp N7   &kp N8 &kp N9    &kp N0 &kp BSPC
   &bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4   &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
   &kp LSHFT  &trans       &trans       &trans       &trans       &trans         &trans   &trans   &trans &trans    &trans &trans
                                    &kp LGUI     &trans       &kp SPACE      &kp RET  &trans   &kp RALT
                        >;
                };

                raise_layer {
// -----------------------------------------------------------------------------------------
// |  TAB |  !  |  @  |  #  |  $  |  %  |   |  ^  |  &  |  *  |  (  |  )  | BKSP |
// | CTRL |     |     |     |     |     |   |  -  |  =  |  [  |  ]  |  \  |  `   |
// | SHFT |     |     |     |     |     |   |  _  |  +  |  {  |  }  | "|" |  ~   |
//                    | GUI |     | SPC |   | ENT |     | ALT |
                        bindings = <
   &kp  TAB  &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT   &kp CARET &kp AMPS  &kp ASTRK &kp LPAR &kp RPAR &kp BSPC
   &kp LCTRL &trans   &trans &trans   &trans   &trans      &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
                        >;
                };
        };
};


================================================
FILE: boards/shields/corne/corne.zmk.yml
================================================
file_format: "1"
id: corne
name: Corne
type: shield
url: https://github.com/foostan/crkbd/
requires: [pro_micro]
exposes: [i2c_oled]
features:
  - keys
  - display
  - underglow
  - studio
siblings:
  - corne_left
  - corne_right
  - corne_left_peripheral
  - corne_dongle_xiao
  - corne_dongle_pro_micro


================================================
FILE: boards/shields/corne/corne_dongle_pro_micro.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/corne/corne_dongle_pro_micro.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#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 = &mock_kscan;
        zmk,physical-layout = &foostan_corne_6col_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <12>;
        rows = <4>;
// | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |   | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |
// | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |   | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |   | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
//                      | SW19 | SW20 | SW21 |   | SW21 | SW20 | SW19 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    five_column_transform: keymap_transform_1 {
        compatible = "zmk,matrix-transform";
        columns = <10>;
        rows = <4>;
// | 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 |
        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)
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)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    /*
        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;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };
    // TODO: per-key RGB node(s)?
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};

// 128x64 OLED model sh1106

&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/corne/corne_dongle_xiao.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/corne/corne_dongle_xiao.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#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 = &mock_kscan;
        zmk,physical-layout = &foostan_corne_6col_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <12>;
        rows = <4>;
// | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |   | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |
// | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |   | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |   | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
//                      | SW19 | SW20 | SW21 |   | SW21 | SW20 | SW19 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    five_column_transform: keymap_transform_1 {
        compatible = "zmk,matrix-transform";
        columns = <10>;
        rows = <4>;
// | 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 |
        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)
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)
                        RC(3,3) RC(3,4) RC(3,5)  RC(3,6) RC(3,7) RC(3,8)
        >;
    };

    /*
        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;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };
    // TODO: per-key RGB node(s)?
};

// 128x64 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


// 128x64 OLED model sh1106

&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// ################# 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 = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
        };
    };
    spi0_sleep: spi0_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
            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 = <&xiao_d 6 GPIO_ACTIVE_HIGH>;  // Pin D6 as CS
};

&xiao_i2c {
    status = "disabled";
};
// ################# niceview working fine END #################
*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/corne/corne_left.conf
================================================


================================================
FILE: boards/shields/corne/corne_left.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "corne.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 21 GPIO_ACTIVE_HIGH>
        , <&pro_micro 20 GPIO_ACTIVE_HIGH>
        , <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        ;
};

// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/corne/corne_left_peripheral.conf
================================================


================================================
FILE: boards/shields/corne/corne_left_peripheral.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "corne.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 21 GPIO_ACTIVE_HIGH>
        , <&pro_micro 20 GPIO_ACTIVE_HIGH>
        , <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        ;
};

// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/corne/corne_right.conf
================================================


================================================
FILE: boards/shields/corne/corne_right.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "corne.dtsi"

&default_transform {
    col-offset = <6>;
};

&five_column_transform {
    col-offset = <6>;
};

&kscan0 {
    col-gpios
        = <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 20 GPIO_ACTIVE_HIGH>
        , <&pro_micro 21 GPIO_ACTIVE_HIGH>
        ;
};

// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/lily58/Kconfig.defconfig
================================================

if SHIELD_LILY58_LEFT || SHIELD_LILY58_DONGLE_XIAO || SHIELD_LILY58_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
    default "Lily58"

config ZMK_SPLIT_ROLE_CENTRAL
    default y

endif

if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT || SHIELD_LILY58_LEFT_PERIPHERAL || SHIELD_LILY58_DONGLE_XIAO || SHIELD_LILY58_DONGLE_PRO_MICRO

config ZMK_SPLIT
    default y

if ZMK_DISPLAY

config I2C
    default y

config SSD1306
    default y

if SHIELD_LILY58_DONGLE_XIAO || SHIELD_LILY58_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
    default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

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 # LVGL

endif


================================================
FILE: boards/shields/lily58/Kconfig.shield
================================================
# Copyright (c) 2020 Pete Johanson
# SPDX-License-Identifier: MIT

config SHIELD_LILY58_LEFT
    def_bool $(shields_list_contains,lily58_left)

config SHIELD_LILY58_RIGHT
    def_bool $(shields_list_contains,lily58_right)

config SHIELD_LILY58_LEFT_PERIPHERAL
    def_bool $(shields_list_contains,lily58_left_peripheral)

config SHIELD_LILY58_DONGLE_XIAO
    def_bool $(shields_list_contains,lily58_dongle_xiao)

config SHIELD_LILY58_DONGLE_PRO_MICRO
    def_bool $(shields_list_contains,lily58_dongle_pro_micro)


================================================
FILE: boards/shields/lily58/boards/nice_nano.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/lily58/boards/nice_nano_v2.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <10>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/lily58/lily58.conf
================================================
# Uncomment to enable encoder
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment the following line to enable the Lily58 OLED Display
# CONFIG_ZMK_DISPLAY=y


================================================
FILE: boards/shields/lily58/lily58.dtsi
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

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

#include <layouts/kata0510/lily58.dtsi>

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &kscan0;
        zmk,physical-layout = &kata0510_lily58_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//                      | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
                        RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10)
        >;
    };

    kscan0: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";
        row-gpios
            = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            ;

    };

    left_encoder: encoder_left {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder>;
        triggers-per-rotation = <20>;
    };
};

&kata0510_lily58_layout {
    transform = <&default_transform>;
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


================================================
FILE: boards/shields/lily58/lily58.keymap
================================================
/*
 * Copyright (c) 2020 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>

/ {
    keymap {
        compatible = "zmk,keymap";

        default_layer {
// ------------------------------------------------------------------------------------------------------------
// |  ESC  |  1  |  2  |  3   |  4   |  5   |                   |  6   |  7    |  8    |  9   |   0   |   `   |
// |  TAB  |  Q  |  W  |  E   |  R   |  T   |                   |  Y   |  U    |  I    |  O   |   P   |   -   |
// |  CTRL |  A  |  S  |  D   |  F   |  G   |                   |  H   |  J    |  K    |  L   |   ;   |   '   |
// | SHIFT |  Z  |  X  |  C   |  V   |  B   |   "["  |  |  "]"  |  N   |  M    |  ,    |  .   |   /   | SHIFT |
//                     | ALT  | GUI  | LOWER|  SPACE |  | ENTER | RAISE| BSPC  | GUI   |
            bindings = <
&kp ESC   &kp N1 &kp N2 &kp N3   &kp N4   &kp N5                     &kp N6 &kp N7   &kp N8    &kp N9  &kp N0   &kp GRAVE
&kp TAB   &kp Q  &kp W  &kp E    &kp R    &kp T                      &kp Y  &kp U    &kp I     &kp O   &kp P    &kp MINUS
&kp LCTRL &kp A  &kp S  &kp D    &kp F    &kp G                      &kp H  &kp J    &kp K     &kp L   &kp SEMI &kp SQT
&kp LSHFT &kp Z  &kp X  &kp C    &kp V    &kp B  &kp LBKT   &kp RBKT &kp N  &kp M    &kp COMMA &kp DOT &kp FSLH &kp RSHFT
                        &kp LALT &kp LGUI &mo 1  &kp SPACE  &kp RET  &mo 2  &kp BSPC &kp RGUI
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };

        lower_layer {
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 |  BT3 |  BT4 |  BT5 |                   |      |       |       |      |       |       |
// |  F1   |  F2 |  F3 |  F4  |  F5  |  F6  |                   |  F7  |  F8   |  F9   |  F10 |  F11  |  F12  |
// |   `   |  !  |  @  |  #   |  $   |  %   |                   |  ^   |  &    |  *    |  (   |   )   |   ~   |
// |       |     |     |      |      |      |        |  |       |      |  _    |  +    |  {   |   }   |  "|"  |
//                     |      |      |      |        |  |       |      |       |       |
            bindings = <
&bt BT_CLR &bt BT_SEL 0     &bt BT_SEL 1      &bt BT_SEL 2      &bt BT_SEL 3 &bt BT_SEL 4                 &trans    &trans    &trans    &trans    &trans    &trans
&kp F1     &kp F2           &kp F3            &kp F4            &kp F5       &kp F6                       &kp F7    &kp F8    &kp F9    &kp F10   &kp F11   &kp F12
&kp GRAVE  &kp EXCL         &kp AT            &kp HASH          &kp DOLLAR   &kp PRCNT                    &kp CARET &kp AMPS  &kp ASTRK &kp LPAR  &kp RPAR  &kp TILDE
&trans     &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans       &trans    &trans   &trans    &trans    &kp MINUS &kp PLUS  &kp LBRC  &kp RBRC  &kp PIPE
                                              &trans            &trans       &trans    &trans   &trans    &trans    &trans    &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };

        raise_layer {
// ------------------------------------------------------------------------------------------------------------
// |       |     |     |      |      |      |                   |      |       |       |      |       |       |
// |   `   |  1  |  2  |  3   |  4   |  5   |                   |  6   |   7   |   8   |  9   |   0   |       |
// |   F1  |  F2 |  F3 |  F4  |  F5  |  F6  |                   |      |   <-  |   v   |  ^   |  ->   |       |
// |   F7  |  F8 |  F9 |  F10 |  F11 |  F12 |        |  |       |  +   |   -   |   =   |  [   |   ]   |   \   |
//                     |      |      |      |        |  |       |      |       |       |
            bindings = <
&trans    &trans &trans &trans  &trans  &trans                       &trans      &trans    &trans    &trans   &trans    &trans
&kp GRAVE &kp N1 &kp N2 &kp N3  &kp N4  &kp N5                       &kp N6      &kp N7    &kp N8    &kp N9   &kp N0    &trans
&kp F1    &kp F2 &kp F3 &kp F4  &kp F5  &kp F6                       &trans      &kp LEFT  &kp DOWN  &kp UP   &kp RIGHT &trans
&kp F7    &kp F8 &kp F9 &kp F10 &kp F11 &kp F12   &trans   &trans    &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT  &kp BSLH
                        &trans  &trans  &trans    &trans   &trans    &trans      &trans    &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };
    };
};


================================================
FILE: boards/shields/lily58/lily58.zmk.yml
================================================
file_format: "1"
id: lily58
name: Lily58
type: shield
url: https://github.com/kata0510/Lily58
requires: [pro_micro]
exposes: [i2c_oled]
features:
  - keys
  - display
  - studio
siblings:
  - lily58_left
  - lily58_right
  - lily58_left_peripheral
  - lily58_dongle_xiao
  - lily58_dongle_pro_micro


================================================
FILE: boards/shields/lily58/lily58_dongle_pro_micro.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/lily58/lily58_dongle_pro_micro.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

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

#include <layouts/kata0510/lily58.dtsi>

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &kata0510_lily58_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//                      | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
                        RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10)
        >;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };

    left_encoder: encoder_left {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder>;
        triggers-per-rotation = <20>;
    };
};

&kata0510_lily58_layout {
    transform = <&default_transform>;
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};

// 128x64 OLED model sh1106

&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/lily58/lily58_dongle_xiao.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/lily58/lily58_dongle_xiao.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

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

#include <layouts/kata0510/lily58.dtsi>

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &kata0510_lily58_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//                      | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11)
                        RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10)
        >;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };

    left_encoder: encoder_left {
    compatible = "alps,ec11";
    a-gpios = <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    b-gpios = <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    steps = <80>;
    };

    sensors {
    	compatible = "zmk,keymap-sensors";
    	sensors = <&left_encoder>;
        triggers-per-rotation = <20>;
    };
};

&kata0510_lily58_layout {
    transform = <&default_transform>;
};

&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


// 128x64 OLED model sh1106

&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// ################# 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 = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
        };
    };
    spi0_sleep: spi0_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
            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 = <&xiao_d 6 GPIO_ACTIVE_HIGH>;  // Pin D6 as CS
};

&xiao_i2c {
    status = "disabled";
};
// ################# niceview working fine END #################
*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/lily58/lily58_left.conf
================================================
# Uncomment to enable encoder
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y


================================================
FILE: boards/shields/lily58/lily58_left.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "lily58.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 10 GPIO_ACTIVE_HIGH>
        ;
};

&left_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/lily58/lily58_left_peripheral.conf
================================================


================================================
FILE: boards/shields/lily58/lily58_left_peripheral.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "lily58.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 10 GPIO_ACTIVE_HIGH>
        ;
};

&left_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/lily58/lily58_right.conf
================================================



================================================
FILE: boards/shields/lily58/lily58_right.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include "lily58.dtsi"

&default_transform {
    col-offset = <6>;
};

&kscan0 {
    col-gpios
        = <&pro_micro 10 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 19 GPIO_ACTIVE_HIGH>
        ;
};


================================================
FILE: boards/shields/sofle/Kconfig.defconfig
================================================
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
    default "Sofle"

config ZMK_SPLIT_ROLE_CENTRAL
    default y

endif

if SHIELD_SOFLE_LEFT || SHIELD_SOFLE_RIGHT || SHIELD_SOFLE_LEFT_PERIPHERAL || SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

config ZMK_SPLIT
    default y

if ZMK_DISPLAY

config I2C
    default y

config SSD1306
    default y

if SHIELD_SOFLE_DONGLE_XIAO || SHIELD_SOFLE_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
    default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

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 # LVGL

if ZMK_RGB_UNDERGLOW

config WS2812_STRIP
    default y
endif

endif


================================================
FILE: boards/shields/sofle/Kconfig.shield
================================================
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

config SHIELD_SOFLE_LEFT
    def_bool $(shields_list_contains,sofle_left)

config SHIELD_SOFLE_RIGHT
    def_bool $(shields_list_contains,sofle_right)

config SHIELD_SOFLE_LEFT_PERIPHERAL
    def_bool $(shields_list_contains,sofle_left_peripheral)

config SHIELD_SOFLE_DONGLE_XIAO
    def_bool $(shields_list_contains,sofle_dongle_xiao)

config SHIELD_SOFLE_DONGLE_PRO_MICRO
    def_bool $(shields_list_contains,sofle_dongle_pro_micro)


================================================
FILE: boards/shields/sofle/boards/nice_nano.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <36>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <
            LED_COLOR_ID_GREEN
            LED_COLOR_ID_RED
            LED_COLOR_ID_BLUE
        >;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/sofle/boards/nice_nano_v2.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <36>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <
            LED_COLOR_ID_GREEN
            LED_COLOR_ID_RED
            LED_COLOR_ID_BLUE
        >;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/sofle/boards/nrfmicro_11.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <36>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <
            LED_COLOR_ID_GREEN
            LED_COLOR_ID_RED
            LED_COLOR_ID_BLUE
        >;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/sofle/boards/nrfmicro_13.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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 = <36>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;

        color-mapping = <
            LED_COLOR_ID_GREEN
            LED_COLOR_ID_RED
            LED_COLOR_ID_BLUE
        >;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/sofle/sofle.conf
================================================
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT

# Uncomment the following line to enable the Sofle OLED Display
# CONFIG_ZMK_DISPLAY=y

# Uncomment these two lines to add support for encoders
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment this line below to add rgb underglow / backlight support
# CONFIG_ZMK_RGB_UNDERGLOW=y

# Uncomment the line below to disable external power toggling by the underglow.
# By default toggling the underglow on and off also toggles external power
# on and off. This also causes the display to turn off.
# CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=n


================================================
FILE: boards/shields/sofle/sofle.dtsi
================================================
/*
 * Copyright (c) 2020 Pete Johanson, Ryan Cross
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &kscan0;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <4>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    kscan0: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";
        row-gpios
            = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            ;
    };

    left_encoder: encoder_left {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
        status = "disabled";
    };

    right_encoder: encoder_right {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
        status = "disabled";
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <20>;
    };
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


================================================
FILE: boards/shields/sofle/sofle.keymap
================================================
/*
 * Copyright (c) 2020 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/ext_power.h>

#define BASE 0
#define LOWER 1
#define RAISE 2
#define ADJUST 3

/ {

   // Activate ADJUST layer by pressing raise and lower
    conditional_layers {
        compatible = "zmk,conditional-layers";
        adjust_layer {
            if-layers = <LOWER RAISE>;
            then-layer = <ADJUST>;
        };
    };

    keymap {
        compatible = "zmk,keymap";

        default_layer {
            display-name = "default";
// ------------------------------------------------------------------------------------------------------------
// |   `   |  1  |  2  |  3   |  4   |  5   |                   |  6   |  7    |  8    |  9   |   0   |       |
// |  ESC  |  Q  |  W  |  E   |  R   |  T   |                   |  Y   |  U    |  I    |  O   |   P   | BKSPC |
// |  TAB  |  A  |  S  |  D   |  F   |  G   |                   |  H   |  J    |  K    |  L   |   ;   |   '   |
// | SHIFT |  Z  |  X  |  C   |  V   |  B   |  MUTE  |  |       |  N   |  M    |  ,    |  .   |   /   | SHIFT |
//               | GUI | ALT  | CTRL | LOWER|  ENTER |  | SPACE | RAISE| CTRL  | ALT   | GUI  |
            bindings = <
&kp GRAVE &kp N1 &kp N2   &kp N3   &kp N4    &kp N5                           &kp N6 &kp N7    &kp N8    &kp N9   &kp N0   &none
&kp ESC   &kp Q  &kp W    &kp E    &kp R     &kp T                            &kp Y  &kp U     &kp I     &kp O    &kp P    &kp BSPC
&kp TAB   &kp A  &kp S    &kp D    &kp F     &kp G                            &kp H  &kp J     &kp K     &kp L    &kp SEMI &kp SQT
&kp LSHFT &kp Z  &kp X    &kp C    &kp V     &kp B      &kp C_MUTE &none      &kp N  &kp M     &kp COMMA &kp DOT  &kp FSLH &kp RSHFT
                 &kp LGUI &kp LALT &kp LCTRL &mo LOWER  &kp RET    &kp SPACE  &mo RAISE  &kp RCTRL &kp RALT  &kp RGUI
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
        };

        lower_layer {
            display-name = "lower";
// TODO: Some binds are waiting for shifted keycode support.
// ------------------------------------------------------------------------------------------------------------
// |       |  F1 |  F2 |  F3  |  F4  |  F5  |                   |  F6  |  F7   |  F8   |  F9  |  F10  |  F11  |
// |   `   |  1  |  2  |  3   |  4   |  5   |                   |  6   |  7    |  8    |  9   |   0   |  F12  |
// |       |  !  |  @  |  #   |  $   |  %   |                   |  ^   |  &    |  *    |  (   |   )   |   |   |
// |       |  =  |  -  |  +   |  {   |  }   |        |  |       |  [   |  ]    |  ;    |  :   |   \   |       |
//               |     |      |      |      |        |  |       |      |       |       |      |
            bindings = <
&trans    &kp F1    &kp F2    &kp F3      &kp F4    &kp F5                    &kp F6    &kp F7   &kp F8    &kp F9    &kp F10   &kp F11
&kp GRAVE &kp N1    &kp N2    &kp N3      &kp N4    &kp N5                    &kp N6    &kp N7   &kp N8    &kp N9    &kp N0    &kp F12
&trans    &kp EXCL  &kp AT    &kp HASH    &kp DLLR  &kp PRCNT                 &kp CARET &kp AMPS &kp ASTRK &kp LPAR  &kp RPAR  &kp PIPE
&trans    &kp EQUAL &kp MINUS &kp PLUS &kp LBRC  &kp RBRC   &trans &trans  &kp LBKT  &kp RBKT &kp SEMI  &kp COLON &kp BSLH  &trans
                    &trans    &trans      &trans    &trans     &trans &trans  &trans    &trans   &trans    &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
        };

        raise_layer {
            display-name = "raise";
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1  | BT2  |  BT3  |  BT4  |  BT5 |                |      |      |       |      |       |       |
// |       | INS  | PSCR | GUI   |       |      |                | PGUP |      |   ^   |      |       |       |
// |       | ALT  | CTRL | SHIFT |       | CAPS |                | PGDN |   <- |   v   |  ->  |  DEL  | BKSPC |
// |       | UNDO | CUT  | COPY  | PASTE |      |      |  |      |      |      |       |      |       |       |
//                |      |       |       |      |      |  |      |      |      |       |      |
            bindings = <
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4                  &trans    &trans    &trans   &trans    &trans  &trans
&trans     &kp INS      &kp PSCRN    &kp K_CMENU  &trans       &trans                        &kp PG_UP &trans    &kp UP   &trans    &kp N0  &trans
&trans     &kp LALT     &kp LCTRL    &kp LSHFT    &trans       &kp CLCK                      &kp PG_DN &kp LEFT  &kp DOWN &kp RIGHT &kp DEL &kp BSPC
&trans     &kp K_UNDO   &kp K_CUT    &kp K_COPY   &kp K_PASTE  &trans        &trans  &trans  &trans    &trans    &trans   &trans    &trans  &trans
                        &trans       &trans       &trans       &trans        &trans  &trans  &trans    &trans    &trans   &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN &inc_dec_kp PG_UP PG_DN>;
        };

        adjust_layer {
// ----------------------------------------------------------------------------------------------------------------------------
// | BTCLR  |  BT1    |  BT2    |   BT3   |   BT4   |   BT5   |                  |      |      |       |      |       |       |
// | EXTPWR | RGB_HUD | RGB_HUI | RGB_SAD | RGB_SAI | RGB_EFF |                  |      |      |       |      |       |       |
// |        | RGB_BRD | RGB_BRI |         |         |         |                  |      |      |       |      |       |       |
// |        |         |         |         |         |         | RGB_TOG | |      |      |      |       |      |       |       |
//                    |         |         |         |         |         | |      |      |      |       |      |
            display-name = "adjust";
            bindings = <
&bt BT_CLR        &bt BT_SEL 0    &bt BT_SEL 1    &bt BT_SEL 2    &bt BT_SEL 3    &bt BT_SEL 4                            &none &none &none &none &none &none
&ext_power EP_TOG &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_EFF                         &none &none &none &none &none &none
&none             &rgb_ug RGB_BRD &rgb_ug RGB_BRI &none           &none           &none                                   &none &none &none &none &none &none
&none             &none           &none           &none           &none           &none            &rgb_ug RGB_TOG &none  &none &none &none &none &none &none
                                  &none           &none           &none           &none            &none           &none  &none &none &none &none
            >;
        };

    };
};


================================================
FILE: boards/shields/sofle/sofle.zmk.yml
================================================
file_format: "1"
id: sofle
name: Sofle
type: shield
url: https://github.com/josefadamcik/SofleKeyboard
requires: [pro_micro]
exposes: [i2c_oled]
features:
  - keys
  - display
  - encoder
  - underglow
  - studio
siblings:
  - sofle_left
  - sofle_right
  - sofle_left_peripheral
  - sofle_dongle_xiao
  - sofle_dongle_pro_micro


================================================
FILE: boards/shields/sofle/sofle_dongle_pro_micro.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/sofle/sofle_dongle_pro_micro.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &josefadamcik_sofle_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <4>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    /*
    kscan0: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";
        row-gpios
            = <&pro_micro 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&pro_micro 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            ;
    };
    */

    left_encoder: encoder_left {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
        status = "disabled";
    };

    right_encoder: encoder_right {
        compatible = "alps,ec11";
        a-gpios = <&pro_micro 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        b-gpios = <&pro_micro 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
        steps = <80>;
        status = "disabled";
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <20>;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};

// 128x64 OLED model sh1106

&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/sofle/sofle_dongle_xiao.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/sofle/sofle_dongle_xiao.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &josefadamcik_sofle_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <16>;
        rows = <4>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };

    /*
    row-gpios
        = <&xiao_d 0 GPIO_ACTIVE_HIGH>
        , <&xiao_d 1 GPIO_ACTIVE_HIGH>
        , <&xiao_d 2 GPIO_ACTIVE_HIGH>
        , <&xiao_d 3 GPIO_ACTIVE_HIGH>
        ;
    };
    */

    left_encoder: encoder_left {
    compatible = "alps,ec11";
    a-gpios = <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    b-gpios = <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    steps = <80>;
    status = "disabled";
    };

    right_encoder: encoder_right {
    compatible = "alps,ec11";
    a-gpios = <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    b-gpios = <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    steps = <80>;
    status = "disabled";

    };

    sensors {
    	compatible = "zmk,keymap-sensors";
    	sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <20>;
    };
};

&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


// 128x64 OLED model sh1106

&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// ################# 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 = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
        };
    };
    spi0_sleep: spi0_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
            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 = <&xiao_d 6 GPIO_ACTIVE_HIGH>;  // Pin D6 as CS
};

&xiao_i2c {
    status = "disabled";
};
// ################# niceview working fine END #################
*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/sofle/sofle_left.conf
================================================
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT


================================================
FILE: boards/shields/sofle/sofle_left.overlay
================================================
/*
 * Copyright (c) 2020 Ryan Cross
 *
 * SPDX-License-Identifier: MIT
 */

#include "sofle.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 10 GPIO_ACTIVE_HIGH>
        ;
};

&left_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/sofle/sofle_left_peripheral.conf
================================================


================================================
FILE: boards/shields/sofle/sofle_left_peripheral.overlay
================================================
/*
 * Copyright (c) 2020 Ryan Cross
 *
 * SPDX-License-Identifier: MIT
 */

#include "sofle.dtsi"

&kscan0 {
    col-gpios
        = <&pro_micro 19 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 10 GPIO_ACTIVE_HIGH>
        ;
};

&left_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/sofle/sofle_right.conf
================================================
# Copyright (c) 2020 Ryan Cross
# SPDX-License-Identifier: MIT


================================================
FILE: boards/shields/sofle/sofle_right.overlay
================================================
/*
 * Copyright (c) 2020 Ryan Cross
 *
 * SPDX-License-Identifier: MIT
 */

#include "sofle.dtsi"

&default_transform {
    col-offset = <6>;
};

&kscan0 {
    col-gpios
        = <&pro_micro 10 GPIO_ACTIVE_HIGH>
        , <&pro_micro 16 GPIO_ACTIVE_HIGH>
        , <&pro_micro 14 GPIO_ACTIVE_HIGH>
        , <&pro_micro 15 GPIO_ACTIVE_HIGH>
        , <&pro_micro 18 GPIO_ACTIVE_HIGH>
        , <&pro_micro 19 GPIO_ACTIVE_HIGH>
        ;
};

&right_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/Kconfig.defconfig
================================================
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT

if SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_XIAO || SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_PRO_MICRO

config ZMK_KEYBOARD_NAME
    default "Aurora Sofle"

config ZMK_SPLIT_ROLE_CENTRAL
    default y

endif # SHIELD_SPLITKB_AURORA_SOFLE_LEFT

if SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT || SHIELD_SPLITKB_AURORA_SOFLE_LEFT_PERIPHERAL || SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_XIAO || SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_PRO_MICRO

config ZMK_SPLIT
    default y

config ZMK_RGB_UNDERGLOW
    select WS2812_STRIP
    select SPI

if ZMK_DISPLAY

config SSD1306
    default y

config I2C
    default y

if SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_XIAO || SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_PRO_MICRO

choice ZMK_DISPLAY_WORK_QUEUE
    default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice

endif

endif # ZMK_DISPLAY

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 # LVGL

endif # SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_SPLITKB_AURORA_SOFLE_RIGHT


================================================
FILE: boards/shields/splitkb_aurora_sofle/Kconfig.shield
================================================
# Copyright (c) 2023 The ZMK Contributors
# SPDX-License-Identifier: MIT

config SHIELD_SPLITKB_AURORA_SOFLE_LEFT
    def_bool $(shields_list_contains,splitkb_aurora_sofle_left)

config SHIELD_SPLITKB_AURORA_SOFLE_RIGHT
    def_bool $(shields_list_contains,splitkb_aurora_sofle_right)

config SHIELD_SPLITKB_AURORA_SOFLE_LEFT_PERIPHERAL
    def_bool $(shields_list_contains,splitkb_aurora_sofle_left_peripheral)

config SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_XIAO
    def_bool $(shields_list_contains,splitkb_aurora_sofle_dongle_xiao)

config SHIELD_SPLITKB_AURORA_SOFLE_DONGLE_PRO_MICRO
    def_bool $(shields_list_contains,splitkb_aurora_sofle_dongle_pro_micro)


================================================
FILE: boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;
        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay
================================================
#include <dt-bindings/led/led.h>

&pinctrl {
    spi3_default: spi3_default {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
        };
    };

    spi3_sleep: spi3_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_MOSI, 0, 6)>;
            low-power-enable;
        };
    };
};

&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>; /* arbitrary; change at will */
        spi-one-frame = <0x70>;
        spi-zero-frame = <0x40>;
        color-mapping = <LED_COLOR_ID_GREEN LED_COLOR_ID_RED LED_COLOR_ID_BLUE>;
    };
};

/ {
    chosen {
        zmk,underglow = &led_strip;
    };
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf
================================================
# Uncomment these two line to add support for encoders to your firmware
# CONFIG_EC11=y
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y

# Uncomment the following line to enable the OLED Display
# CONFIG_ZMK_DISPLAY=y

# Uncomment the following lines to enable RGB underglow
# CONFIG_ZMK_RGB_UNDERGLOW=y


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi
================================================
/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

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

#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {

    chosen {
        zephyr,display = &oled;
        zmk,physical-layout = &josefadamcik_sofle_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <14>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    left_encoder: left_encoder {
        compatible = "alps,ec11";
        steps = <144>;
        status = "disabled";

        a-gpios = <&pro_micro 16 GPIO_PULL_UP>;
        b-gpios = <&pro_micro 10 GPIO_PULL_UP>;
    };

    right_encoder: right_encoder {
        compatible = "alps,ec11";
        steps = <144>;
        status = "disabled";

        a-gpios = <&pro_micro 16 GPIO_PULL_UP>;
        b-gpios = <&pro_micro 10 GPIO_PULL_UP>;
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <36>;
    };
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap
================================================
/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include <behaviors.dtsi>
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/bt.h>
#include <dt-bindings/zmk/ext_power.h>

/* Uncomment this block if using RGB
&led_strip {
    chain-length = <6>;
    // chain-length = <35>; // Uncomment if using both per-key and underglow LEDs
    // chain-length = <29>; // Uncomment if using only per-key LEDs.
};
 */

/ {
    keymap {
        compatible = "zmk,keymap";

        default_layer {
// ------------------------------------------------------------------------------------------------------------
// |  ESC  |  1  |  2  |  3   |  4   |  5   |                   |  6   |  7    |  8    |  9   |   0   |   `   |
// |  TAB  |  Q  |  W  |  E   |  R   |  T   |                   |  Y   |  U    |  I    |  O   |   P   |   -   |
// |  CTRL |  A  |  S  |  D   |  F   |  G   |                   |  H   |  J    |  K    |  L   |   ;   |   '   |
// | SHIFT |  Z  |  X  |  C   |  V   |  B   |   "["  |  |  "]"  |  N   |  M    |  ,    |  .   |   /   | SHIFT |
//               |CTRL | ALT  | GUI  | LOWER|  SPACE |  | ENTER | RAISE| BSPC  | GUI   | RALT |
            bindings = <
&kp ESC   &kp N1 &kp N2    &kp N3   &kp N4   &kp N5                     &kp N6 &kp N7   &kp N8    &kp N9   &kp N0   &kp GRAVE
&kp TAB   &kp Q  &kp W     &kp E    &kp R    &kp T                      &kp Y  &kp U    &kp I     &kp O    &kp P    &kp MINUS
&kp LCTRL &kp A  &kp S     &kp D    &kp F    &kp G                      &kp H  &kp J    &kp K     &kp L    &kp SEMI &kp SQT
&kp LSHFT &kp Z  &kp X     &kp C    &kp V    &kp B  &kp LBKT   &kp RBKT &kp N  &kp M    &kp COMMA &kp DOT  &kp FSLH &kp RSHFT
                 &kp LCTRL &kp LALT &kp LGUI &mo 1  &kp SPACE  &kp RET  &mo 2  &kp BSPC &kp RGUI  &kp RALT
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };

        lower_layer {
// ------------------------------------------------------------------------------------------------------------
// | BTCLR | BT1 | BT2 |  BT3 |  BT4 |  BT5 |                   |      |       |       |      |       |       |
// |  F1   |  F2 |  F3 |  F4  |  F5  |  F6  |                   |  F7  |  F8   |  F9   |  F10 |  F11  |  F12  |
// |   `   |  !  |  @  |  #   |  $   |  %   |                   |  ^   |  &    |  *    |  (   |   )   |   ~   |
// |       |     |     |      |      |      |        |  |       |      |  _    |  +    |  {   |   }   |  "|"  |
//               |     |      |      |      |        |  |       |      |       |       |      |
            bindings = <
&bt BT_CLR &bt BT_SEL 0     &bt BT_SEL 1      &bt BT_SEL 2      &bt BT_SEL 3 &bt BT_SEL 4                 &trans    &trans    &trans    &trans    &trans    &trans
&kp F1     &kp F2           &kp F3            &kp F4            &kp F5       &kp F6                       &kp F7    &kp F8    &kp F9    &kp F10   &kp F11   &kp F12
&kp GRAVE  &kp EXCL         &kp AT            &kp HASH          &kp DOLLAR   &kp PRCNT                    &kp CARET &kp AMPS  &kp STAR  &kp LPAR  &kp RPAR  &kp TILDE
&trans     &ext_power EP_ON &ext_power EP_OFF &ext_power EP_TOG &trans       &trans    &trans   &trans    &trans    &kp MINUS &kp PLUS  &kp LBRC  &kp RBRC  &kp PIPE
                            &trans            &trans            &trans       &trans    &trans   &trans    &trans    &trans    &trans    &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };

        raise_layer {
// ------------------------------------------------------------------------------------------------------------
// |       |     |     |      |      |      |                   |      |       |       |      |       |       |
// |   `   |  1  |  2  |  3   |  4   |  5   |                   |  6   |   7   |   8   |  9   |   0   |       |
// |   F1  |  F2 |  F3 |  F4  |  F5  |  F6  |                   |      |   <-  |   v   |  ^   |  ->   |       |
// |   F7  |  F8 |  F9 |  F10 |  F11 |  F12 |        |  |       |  +   |   -   |   =   |  [   |   ]   |   \   |
//               |     |      |      |      |        |  |       |      |       |       |      |
            bindings = <
&trans    &trans &trans &trans  &trans  &trans                       &trans      &trans    &trans    &trans   &trans    &trans
&kp GRAVE &kp N1 &kp N2 &kp N3  &kp N4  &kp N5                       &kp N6      &kp N7    &kp N8    &kp N9   &kp N0    &trans
&kp F1    &kp F2 &kp F3 &kp F4  &kp F5  &kp F6                       &trans      &kp LEFT  &kp DOWN  &kp UP   &kp RIGHT &trans
&kp F7    &kp F8 &kp F9 &kp F10 &kp F11 &kp F12   &trans   &trans    &kp KP_PLUS &kp MINUS &kp EQUAL &kp LBKT &kp RBKT  &kp BSLH
                 &trans &trans  &trans  &trans    &trans   &trans    &trans      &trans    &trans    &trans
            >;

            sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
        };
    };
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml
================================================
file_format: "1"
id: splitkb_aurora_sofle
name: splitkb.com Aurora Sofle
type: shield
url: https://splitkb.com/products/aurora-sofle-pcb-kit
requires: [pro_micro]
exposes: [i2c_oled]
features:
  - keys
  - display
  - encoder
  - underglow
  - studio
siblings:
  - splitkb_aurora_sofle_left
  - splitkb_aurora_sofle_right
  - splitkb_aurora_sofle_left_peripheral
  - splitkb_aurora_sofle_dongle_xiao
  - splitkb_aurora_sofle_dongle_pro_micro


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_pro_micro.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_pro_micro.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &josefadamcik_sofle_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <14>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };

    left_encoder: left_encoder {
        compatible = "alps,ec11";
        steps = <144>;
        status = "disabled";

        a-gpios = <&pro_micro 16 GPIO_PULL_UP>;
        b-gpios = <&pro_micro 10 GPIO_PULL_UP>;
    };

    right_encoder: right_encoder {
        compatible = "alps,ec11";
        steps = <144>;
        status = "disabled";

        a-gpios = <&pro_micro 16 GPIO_PULL_UP>;
        b-gpios = <&pro_micro 10 GPIO_PULL_UP>;
    };

    sensors: sensors {
        compatible = "zmk,keymap-sensors";
        sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <36>;
    };
};

&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&pro_micro_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};

// 128x64 OLED model sh1106

&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&pro_micro_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_xiao.conf
================================================
# MC:
# 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

### DISPLAY DONGLE OPTIONS
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y

### 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


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_xiao.overlay
================================================
/*
 * Copyright (c) 2020 Pete Johanson
 *
 * SPDX-License-Identifier: MIT
 */

#include <dt-bindings/zmk/matrix_transform.h>
#include <layouts/josefadamcik/sofle.dtsi>

&josefadamcik_sofle_layout {
    transform = <&default_transform>;
};

/ {
    chosen {
        zephyr,display = &oled;
        zmk,kscan = &mock_kscan;
        zmk,physical-layout = &josefadamcik_sofle_layout;
    };

    default_transform: keymap_transform_0 {
        compatible = "zmk,matrix-transform";
        columns = <14>;
        rows = <5>;
// | SW6  | SW5  | SW4  | SW3  | SW2  | SW1  |                 | SW1  | SW2  | SW3  | SW4  | SW5  | SW6  |
// | SW12 | SW11 | SW10 | SW9  | SW8  | SW7  |                 | SW7  | SW8  | SW9  | SW10 | SW11 | SW12 |
// | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |                 | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 |
// | SW24 | SW23 | SW22 | SW21 | SW20 | SW19 | SW25 |   | SW25 | SW19 | SW20 | SW21 | SW22 | SW23 | SW24 |
//               | SW30 | SW29 | SW28 | SW27 | SW26 |   | SW26 | SW27 | SW28 | SW29 | SW30 |
        map = <
RC(0,0) 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(0,11)
RC(1,0) 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) RC(1,11)
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) RC(2,10) RC(2,11)
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) RC(3,8)  RC(3,9) RC(3,10) RC(3,11)
                RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11)
        >;
    };

    mock_kscan: kscan_0 {
        compatible = "zmk,kscan-mock";
        // wakeup-source;
        columns = <0>;
        rows = <0>;
        events = <0>;
    };

    /*
    row-gpios
        = <&xiao_d 0 GPIO_ACTIVE_HIGH>
        , <&xiao_d 1 GPIO_ACTIVE_HIGH>
        , <&xiao_d 2 GPIO_ACTIVE_HIGH>
        , <&xiao_d 3 GPIO_ACTIVE_HIGH>
        ;
    };
    */

    left_encoder: encoder_left {
    compatible = "alps,ec11";
    a-gpios = <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    b-gpios = <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    steps = <80>;
    status = "disabled";
    };

    right_encoder: encoder_right {
    compatible = "alps,ec11";
    a-gpios = <&xiao_d 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    b-gpios = <&xiao_d 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
    steps = <80>;
    status = "disabled";

    };

    sensors {
    	compatible = "zmk,keymap-sensors";
    	sensors = <&left_encoder &right_encoder>;
        triggers-per-rotation = <20>;
    };
};

&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};

/*
// 128x64 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <64>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
    };
};
// 128x32 OLED
&xiao_i2c {
    status = "okay";

    oled: ssd1306@3c {
        compatible = "solomon,ssd1306fb";
        reg = <0x3c>;
        width = <128>;
        height = <32>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <31>;
        segment-remap;
        com-invdir;
        com-sequential;
        inversion-on;
        prechargep = <0x22>;
    };
};


// 128x64 OLED model sh1106

&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <129>;
        height = <64>;
        segment-offset = <1>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <63>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// 128x128 OLED model sh1107
&xiao_i2c {
    status = "okay";
    oled: sh1106@3c {
        compatible = "sinowealth,sh1106";
        reg = <0x3c>;
        width = <120>;
        height = <128>;
        segment-offset = <0>;
        page-offset = <0>;
        display-offset = <0>;
        multiplex-ratio = <119>;
        segment-remap;
        com-invdir;
        inversion-on;
        prechargep = <0x22>;
        };
};

// ################# 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 = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
        };
    };
    spi0_sleep: spi0_sleep {
        group1 {
            psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
                    <NRF_PSEL(SPIM_MOSI, 1, 15)>,
                    <NRF_PSEL(SPIM_MISO, 1, 14)>;
            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 = <&xiao_d 6 GPIO_ACTIVE_HIGH>;  // Pin D6 as CS
};

&xiao_i2c {
    status = "disabled";
};
// ################# niceview working fine END #################
*/
// vim: filetype=dts fdm=marker:


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay
================================================
/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include "splitkb_aurora_sofle.dtsi"

/ {
    chosen {
        zmk,kscan = &kscan;
    };

    kscan: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";

        row-gpios
            = <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            ;

        col-gpios
            = <&pro_micro 9 GPIO_ACTIVE_HIGH>
            , <&pro_micro 8 GPIO_ACTIVE_HIGH>
            , <&pro_micro 7 GPIO_ACTIVE_HIGH>
            , <&pro_micro 6 GPIO_ACTIVE_HIGH>
            , <&pro_micro 5 GPIO_ACTIVE_HIGH>
            , <&pro_micro 4 GPIO_ACTIVE_HIGH>
            ;
    };
};

&left_encoder {
    status = "okay";
};




================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left_peripheral.conf
================================================


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left_peripheral.overlay
================================================
/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include "splitkb_aurora_sofle.dtsi"

/ {
    chosen {
        zmk,kscan = &kscan;
    };

    kscan: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";

        row-gpios
            = <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            ;

        col-gpios
            = <&pro_micro 9 GPIO_ACTIVE_HIGH>
            , <&pro_micro 8 GPIO_ACTIVE_HIGH>
            , <&pro_micro 7 GPIO_ACTIVE_HIGH>
            , <&pro_micro 6 GPIO_ACTIVE_HIGH>
            , <&pro_micro 5 GPIO_ACTIVE_HIGH>
            , <&pro_micro 4 GPIO_ACTIVE_HIGH>
            ;
    };
};

&left_encoder {
    status = "okay";
};


================================================
FILE: boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay
================================================
/*
 * Copyright (c) 2023 The ZMK Contributors
 *
 * SPDX-License-Identifier: MIT
 */

#include "splitkb_aurora_sofle.dtsi"

/ {
    chosen {
        zmk,kscan = &kscan;
    };

    kscan: kscan {
        compatible = "zmk,kscan-gpio-matrix";
        wakeup-source;

        diode-direction = "col2row";

        row-gpios
            = <&pro_micro 14 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 15 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 18 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 19 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            , <&pro_micro 20 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>
            ;

        col-gpios
            = <&pro_micro 6 GPIO_ACTIVE_HIGH>
            , <&pro_micro 7 GPIO_ACTIVE_HIGH>
            , <&pro_micro 8 GPIO_ACTIVE_HIGH>
            , <&pro_micro 9 GPIO_ACTIVE_HIGH>
            , <&pro_micro 4 GPIO_ACTIVE_HIGH>
            , <&pro_micro 5 GPIO_ACTIVE_HIGH>
            ;
    };
};

&right_encoder {
    status = "okay";
};

&default_transform {
    col-offset = <6>;
};


================================================
FILE: build.yaml
================================================
# ========================================
# FileName: build.yaml
# Date: 07.06.2023
# Author: Marcos Chow Castro
# Email: mctechnology170318@gmail.com
# GitHub: https://github.com/mctechnology17
# Brief: configuration file for ZMK firmware
# Board: nice_nano_v2 and puchi_ble_v1
# shield: corne_left nice_view_adapter nice_view,
#         corne_right nice_view_adapter nice_view,
#         corne_left, corne_right and settings_reset
# =========================================
#                              ╔═╦═╦═╗
#                       ╔════╗ ║║║║║╔╝
#                       ║╔╗╔╗║ ║║║║║╚╗
#                       ╚╝║║╚╝ ║╠═╩╩═╝
#                         ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
#                         ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
#                         ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
#                                         ╚═╩═╝
# This file generates the GitHub Actions matrix
# For simple board + shield combinations, add them
# to the top level board and shield arrays, for more
# control, add individual board + shield combinations to
# the `include` property, e.g:
#
# board: [ "nice_nano_v2" ]
# shield: [ "corne_left", "corne_right" ]
# include:
#   - board: bdn9_rev2
#   - board: nice_nano_v2
#     shield: reviung41
#
# Split Keyboard Halves Unable to Pair
#     https://zmk.dev/docs/troubleshooting
#   - board: nice_nano_v2
#     shield: settings_reset
# Reset Split Keyboard Procedure
# Perform the following steps to reset both halves of your split keyboard:
# - Put each half of the split keyboard into bootloader mode.
# - Flash one of the halves of the split with the downloaded settings reset UF2
# image. Immediately after flashing the chosen half, put it into bootloader
# mode to avoid accidental bonding between the halves.
# - Repeat step 2 with the other half of the split keyboard.
# - Flash the actual image for each half of the split keyboard (e.g
# my_board_left.uf2 to the left half, my_board_right.uf2 to the right half).
#
# After completing these steps, pair the halves of the split keyboard
# together by resetting them at the same time. Most commonly, this is done by
# grounding the reset pins for each of your keyboard's microcontrollers or
# pressing the reset buttons at the same time.
#
# cmake-args: -DKEYMAP_FILE=../../config/other-corne.keymap -DCONFIG_ZMK_KEYBOARD_NAME=\"other-corne\" -DEXTRA_CONF_FILE=../../config/other-corne.conf
---
include:

  ### CORNE START ###
    ### nice_view START ###
    # nice_nano_v2 + nice_epaper
  - board: nice_nano_v2
    shield: corne_left nice_view_adapter nice_epaper
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\"
    artifact-name: nice_corne_left_view
    snippet: studio-rpc-usb-uart
  - board: nice_nano_v2
    shield: corne_right nice_view_adapter nice_epaper
    artifact-name: nice_corne_right_view

    # puchi_ble_v1 + nice_epaper
  - board: puchi_ble_v1
    shield: corne_left nice_view_adapter nice_epaper
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Corne_V\"
    artifact-name: puchi_corne_left_view
    snippet: studio-rpc-usb-uart
  - board: puchi_ble_v1
    shield: corne_right nice_view_adapter nice_view
    artifact-name: puchi_corne_right_view

    # peripheral_left + nice_nano_v2 + nice_epaper
  - board: nice_nano_v2
    shield: corne_left_peripheral nice_view_adapter nice_epaper
    artifact-name: nice_corne_left_peripheral_view

    # peripheral_left + puchi_ble_v1 + nice_epaper
  - board: puchi_ble_v1
    shield: corne_left_peripheral nice_view_adapter nice_epaper
    artifact-name: puchi_corne_left_peripheral_view
    ### nice_view END ###

    ### nice_oled START ###
    # nice_nano_v2 + nice_oled
  - board: nice_nano_v2
    shield: corne_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_Oled\"
    artifact-name: nice_corne_left_oled
    snippet: studio-rpc-usb-uart
  - board: nice_nano_v2
    shield: corne_right nice_oled
    artifact-name: nice_corne_right_oled

    # puchi_ble_v1 + nice_oled
  - board: puchi_ble_v1
    shield: corne_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Corne_O\"
    artifact-name: puchi_corne_left_oled
    snippet: studio-rpc-usb-uart
  - board: puchi_ble_v1
    shield: corne_right nice_oled
    artifact-name: puchi_corne_right_oled

    # peripheral_left + nice_nano_v2 + nice_oled
  - board: nice_nano_v2
    shield: corne_left_peripheral nice_oled
    artifact-name: nice_corne_left_peripheral_oled

    # peripheral_left + puchi_ble_v1 + nice_oled
  - board: puchi_ble_v1
    shield: corne_left_peripheral nice_oled
    artifact-name: puchi_corne_left_peripheral_oled
    ### nice_oled END ###

    ### Xiao_Dongle START ###
  - board: seeeduino_xiao_ble
    shield: corne_dongle_xiao
    #  -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
    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_oled
    snippet: studio-rpc-usb-uart
    # snippet: zmk-usb-logging
    ### Xiao_Dongle END ###

    ### ProMicro_Dongle START ###
    # nice_nano_v2 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: 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_oled
    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
    snippet: studio-rpc-usb-uart
    # snippet: zmk-usb-logging
  - board: puchi_ble_v1
    shield: corne_dongle_pro_micro nice_view_adapter nice_epaper
    #  -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_view
    # snippet: zmk-usb-logging
    ### Pro Micro END ###

    ### ProMicro_Dongle START ###
    # NICE x PUCHI and nice_oled + rgb
  - board: nice_nano_v2
    shield: corne_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Corne_Oled_RGB\"
    artifact-name: nice_corne_left_oled_rgb
    snippet: rgb-config studio-rpc-usb-uart
  - board: puchi_ble_v1
    shield: corne_right nice_oled
    snippet: rgb-config
    artifact-name: puchi_corne_right_oled_rgb
    ### Pro Micro END ###
  ### CORNE END ###

  ### SOFLEV2 SOFLEV1 SOFLEPLUS START ###
  # nice!oled sofle
  - board: nice_nano_v2
    shield: sofle_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Sofle_Oled\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_sofle_left_oled
    snippet: studio-rpc-usb-uart
  - board: nice_nano_v2
    shield: sofle_right nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_sofle_right_oled

  # peripheral_left
  - board: nice_nano_v2
    shield: sofle_left_peripheral nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_sofle_left_peripheral_oled

  # Xiao_Dongle
  - board: seeeduino_xiao_ble
    shield: sofle_dongle_xiao oled_adapter_seeeduino_xiao_ble_128x64 dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"SofleDongle_X\" -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: xiao_sofle_dongle_xiao_oled
    snippet: studio-rpc-usb-uart

  # ProMicro_Dongle
  - board: nice_nano_v2
    shield: sofle_dongle_pro_micro dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"SofleDongle_P\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=n -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_sofle_dongle_oled
    snippet: studio-rpc-usb-uart
  ### SOFLEV2 SOFLEV1 SOFLEPLUS END ###

  ### LILY58 START ###
  # nice!oled lily58
  - board: nice_nano_v2
    shield: lily58_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"lily58_Oled\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_lily58_left_oled
    snippet: studio-rpc-usb-uart
  - board: nice_nano_v2
    shield: lily58_right nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_lily58_right_oled

  # peripheral_left
  - board: nice_nano_v2
    shield: lily58_left_peripheral nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_lily58_left_peripheral_oled

  # Xiao_Dongle
  - board: seeeduino_xiao_ble
    shield: lily58_dongle_xiao oled_adapter_seeeduino_xiao_ble_128x64 dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"lily58Dongle_X\" -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: xiao_lily58_dongle_xiao_oled
    snippet: studio-rpc-usb-uart

  # ProMicro_Dongle
  - board: nice_nano_v2
    shield: lily58_dongle_pro_micro dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"lily58Dongle_P\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=n -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_lily58_dongle_oled
    snippet: studio-rpc-usb-uart
  ### LILY58 END ###

  ### SPLITKB AURORA SOFLE START ###
  # nice!oled splitkb_aurora_sofle
  - board: nice_nano_v2
    shield: splitkb_aurora_sofle_left nice_oled
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"A_Sofle_Oled\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_splitkb_aurora_sofle_left_oled
    snippet: studio-rpc-usb-uart
  - board: nice_nano_v2
    shield: splitkb_aurora_sofle_right nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_splitkb_aurora_sofle_right_oled

  # peripheral_left
  - board: nice_nano_v2
    shield: splitkb_aurora_sofle_left_peripheral nice_oled
    cmake-args: -DCONFIG_ZMK_SLEEP=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_splitkb_aurora_sofle_left_peripheral_oled

  # Xiao_Dongle
  - board: seeeduino_xiao_ble
    shield: splitkb_aurora_sofle_dongle_xiao oled_adapter_seeeduino_xiao_ble_128x64 dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"A_SofleDongle_X\" -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: xiao_splitkb_aurora_sofle_dongle_xiao_oled
    snippet: studio-rpc-usb-uart

  # ProMicro_Dongle
  - board: nice_nano_v2
    shield: splitkb_aurora_sofle_dongle_pro_micro dongle_display
    cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"A_SofleDongle_P\"  -DCONFIG_ZMK_STUDIO=y -DCONFIG_ZMK_SLEEP=n -DCONFIG_ZMK_IDLE_TIMEOUT=60000
    artifact-name: nice_splitkb_aurora_sofle_dongle_oled
    snippet: studio-rpc-usb-uart
  ### SPLITKB AURORA SOFLE END ###

  ### SETTINGS_RESET START ###
  - board: nice_nano_v2
    shield: settings_reset
    artifact-name: nice_settings_reset
  - board: seeeduino_xiao_ble
    shield: settings_reset
    artifact-name: xiao_settings_reset
  - board: puchi_ble_v1
    shield: settings_reset
    artifact-name: puchi_settings_reset
  ### SETTINGS_RESET END ###


================================================
FILE: config/config_keymap-drawer.yaml
================================================
# configuration for https://github.com/caksoylar/keymap-drawer
draw_config:
  footer_text: 'Keymap View: <a href="https://github.com/caksoylar/keymap-drawer">keymap-drawer</a>'
  # dark_mode: auto
  n_columns: 1
  # draw_key_sides: true # draw a square in the middle of the keys
  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: 16px;
      font-weight: bold;
      text-rendering: optimizeLegibility;
    }

    /* Color accent for held keys
    red = #f00
    green = #0f0
    blue = #00f
    yellow = #ff0
    cyan = #0ff
    magenta = #f0f
    white = #fff
    black = #000
    grey = #888
    light grey = #ccc
    #ffc
    */
    rect.held, rect.combo.held {
        fill: #f00;
    }

    /* 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:
  raw_binding_map:
    '&sys_reset': Reset
    '&bootloader': Boot
    '&swapper': Win Next
    '&caps_word': Caps Word
    '&inv_qm': ¿

    '&kp LC(LG(LEFT))': Desk Left
    '&kp LC(LG(RIGHT))': Desk Right
    '&kp LC(TAB)': Tab Right
    '&kp LC(LS(TAB))': Tab Left
    '&kp LA(F4)': Win Close
    '&kp LC(F4)': Tab Close
    '&kp LS(TAB)': Win Prev
    '&kp LS(INS)': Paste
    '&kp LG(L)': Lock

    '&out OUT_USB': Out USB
    '&out OUT_BLE': Out BLE

    '&bt BT_SEL 0': BT 1
    '&bt BT_SEL 1': BT 2
    '&bt BT_SEL 2': BT 3
    '&bt BT_SEL 3': BT 4
    '&bt BT_SEL 4': BT 5

    # Display
    'DISPLAY_UP': {t: $$mdi:television-classic$$, h: $$mdi:arrow-up$$, type: tap_dance}
    'DISPLAY_DOWN': {t: $$mdi:television-classic$$, h: $$mdi:arrow-down$$, type: tap_dance}
    'DISPLAY_LEFT': {t: $$mdi:television-classic$$, h: $$mdi:arrow-left$$, type: tap_dance}
    'DISPLAY_RIGHT': {t: $$mdi:television-classic$$, h: $$mdi:arrow-right$$, type: tap_dance}
    'DISPLAY_SPACE': {t: $$mdi:television-classic$$, h: $$mdi:keyboard-space$$, type: tap_dance}


    # Rgb
    '&rgb_ug RGB_TOG': {t: $$mdi:led-on$$, h: $$mdi:toggle-switch$$, s: $$mdi:led-outline$$, type: toggle}
    '&rgb_ug RGB_VAI': {t: $$mdi:led-on$$, s: $$tabler:brightness-up$$, type: sym_by_sym}
    '&rgb_ug RGB_VAD': {t: $$mdi:led-outline$$, s: $$tabler:brightness-down$$, type: sym_by_sym}
    '&rgb_ug RGB_BRD': {t: $$mdi:led-on$$, s: $$tabler:brightness-up$$, type: sym_by_sym}
    '&rgb_ug RGB_BRI': {t: $$mdi:led-outline$$, s: $$tabler:brightness-down$$, type: sym_by_sym}
    '&rgb_ug RGB_SAI': {t: $$mdi:led-outline$$, s: $$mdi:eyedropper$$, type: sym_by_sym}
    '&rgb_ug RGB_SAD': {t: $$mdi:led-on$$, s: $$mdi:eyedropper$$, type: sym_by_sym}
    '&rgb_ug RGB_HUI': {t: $$mdi:led-on$$, s: $$mdi:palette$$, type: sym_by_sym}
    '&rgb_ug RGB_HUD': {t: $$mdi:led-outline$$, s: $$mdi:palette$$, type: sym_by_sym}
    '&rgb_ug RGB_RMOD': {t: $$mdi:led-on$$, h: $$mdi:page-previous-outline$$, type: tap_dance}
    '&rgb_ug RGB_MOD': {t: $$mdi:led-on$$, h: $$mdi:page-next-outline$$, type: tap_dance}
    '&rgb_ug RGB_EFF': {t: $$mdi:led-on$$, h: $$mdi:page-previous-outline$$, type: tap_dance}
    '&rgb_ug RGB_EFR': {t: $$mdi:led-on$$
Download .txt
gitextract_f__jg5f7/

├── .gitattributes
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── build.yml
│       └── keymap-drawer.yaml
├── .gitignore
├── CHANGELOG.txt
├── LICENSE
├── Makefile
├── README.md
├── boards/
│   ├── nice_nano.overlay
│   ├── nice_nano_v2.overlay
│   ├── nrfmicro_11.overlay
│   ├── nrfmicro_11_flipped.overlay
│   ├── nrfmicro_13.overlay
│   ├── puchi_ble_v1.overlay
│   ├── seeeduino_xiao_ble.overlay
│   └── shields/
│       ├── corne/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   └── nice_nano_v2.overlay
│       │   ├── corne.conf
│       │   ├── corne.dtsi
│       │   ├── corne.keymap
│       │   ├── corne.zmk.yml
│       │   ├── corne_dongle_pro_micro.conf
│       │   ├── corne_dongle_pro_micro.overlay
│       │   ├── corne_dongle_xiao.conf
│       │   ├── corne_dongle_xiao.overlay
│       │   ├── corne_left.conf
│       │   ├── corne_left.overlay
│       │   ├── corne_left_peripheral.conf
│       │   ├── corne_left_peripheral.overlay
│       │   ├── corne_right.conf
│       │   └── corne_right.overlay
│       ├── lily58/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   └── nice_nano_v2.overlay
│       │   ├── lily58.conf
│       │   ├── lily58.dtsi
│       │   ├── lily58.keymap
│       │   ├── lily58.zmk.yml
│       │   ├── lily58_dongle_pro_micro.conf
│       │   ├── lily58_dongle_pro_micro.overlay
│       │   ├── lily58_dongle_xiao.conf
│       │   ├── lily58_dongle_xiao.overlay
│       │   ├── lily58_left.conf
│       │   ├── lily58_left.overlay
│       │   ├── lily58_left_peripheral.conf
│       │   ├── lily58_left_peripheral.overlay
│       │   ├── lily58_right.conf
│       │   └── lily58_right.overlay
│       ├── sofle/
│       │   ├── Kconfig.defconfig
│       │   ├── Kconfig.shield
│       │   ├── boards/
│       │   │   ├── nice_nano.overlay
│       │   │   ├── nice_nano_v2.overlay
│       │   │   ├── nrfmicro_11.overlay
│       │   │   └── nrfmicro_13.overlay
│       │   ├── sofle.conf
│       │   ├── sofle.dtsi
│       │   ├── sofle.keymap
│       │   ├── sofle.zmk.yml
│       │   ├── sofle_dongle_pro_micro.conf
│       │   ├── sofle_dongle_pro_micro.overlay
│       │   ├── sofle_dongle_xiao.conf
│       │   ├── sofle_dongle_xiao.overlay
│       │   ├── sofle_left.conf
│       │   ├── sofle_left.overlay
│       │   ├── sofle_left_peripheral.conf
│       │   ├── sofle_left_peripheral.overlay
│       │   ├── sofle_right.conf
│       │   └── sofle_right.overlay
│       └── splitkb_aurora_sofle/
│           ├── Kconfig.defconfig
│           ├── Kconfig.shield
│           ├── boards/
│           │   ├── nice_nano.overlay
│           │   └── nice_nano_v2.overlay
│           ├── splitkb_aurora_sofle.conf
│           ├── splitkb_aurora_sofle.dtsi
│           ├── splitkb_aurora_sofle.keymap
│           ├── splitkb_aurora_sofle.zmk.yml
│           ├── splitkb_aurora_sofle_dongle_pro_micro.conf
│           ├── splitkb_aurora_sofle_dongle_pro_micro.overlay
│           ├── splitkb_aurora_sofle_dongle_xiao.conf
│           ├── splitkb_aurora_sofle_dongle_xiao.overlay
│           ├── splitkb_aurora_sofle_left.overlay
│           ├── splitkb_aurora_sofle_left_peripheral.conf
│           ├── splitkb_aurora_sofle_left_peripheral.overlay
│           └── splitkb_aurora_sofle_right.overlay
├── build.yaml
├── config/
│   ├── config_keymap-drawer.yaml
│   ├── corne.conf
│   ├── corne.keymap
│   ├── keymap_german_mac_iso_zmk.h
│   ├── lily58.conf
│   ├── lily58.keymap
│   ├── sofle.conf
│   ├── sofle.keymap
│   ├── splitkb_aurora_sofle.conf
│   ├── splitkb_aurora_sofle.keymap
│   └── west.yml
├── firmware/
│   ├── nice_corne_dongle_oled.uf2
│   ├── nice_corne_dongle_pro_micro.uf2
│   ├── nice_corne_left_oled.uf2
│   ├── nice_corne_left_peripheral_oled.uf2
│   ├── nice_corne_left_peripheral_view.uf2
│   ├── nice_corne_left_view.uf2
│   ├── nice_corne_right_oled.uf2
│   ├── nice_corne_right_view.uf2
│   ├── nice_settings_reset.uf2
│   ├── puchi_corne_dongle.uf2
│   ├── puchi_corne_dongle_view.uf2
│   ├── puchi_corne_left_oled.uf2
│   ├── puchi_corne_left_peripheral_oled.uf2
│   ├── puchi_corne_left_peripheral_view.uf2
│   ├── puchi_corne_left_view.uf2
│   ├── puchi_corne_right_oled.uf2
│   ├── puchi_corne_right_view.uf2
│   ├── puchi_settings_reset.uf2
│   ├── xiao_corne_dongle.uf2
│   ├── xiao_corne_dongle_oled.uf2
│   └── xiao_settings_reset.uf2
├── keymap-drawer/
│   ├── corne.yaml
│   ├── lily58.yaml
│   ├── sofle.yaml
│   └── splitkb_aurora_sofle.yaml
├── snippets/
│   ├── common-config/
│   │   ├── common-config.conf
│   │   └── snippet.yml
│   ├── dongle-config/
│   │   ├── dongle-config.conf
│   │   └── snippet.yml
│   └── rgb-config/
│       ├── rgb-config.conf
│       └── snippet.yml
└── zephyr/
    └── module.yml
Condensed preview — 132 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (279K chars).
[
  {
    "path": ".gitattributes",
    "chars": 60,
    "preview": "*.dtsi linguist-language=C++\n*.keymap linguist-language=C++\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 920,
    "preview": "# These are supported funding model platforms\n# WebSite: https://www.youtube.com/c/mctechnology17\ngithub: mctechnology17"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 133,
    "preview": "on: [push, pull_request, workflow_dispatch]\n\njobs:\n  build:\n    uses: zmkfirmware/zmk/.github/workflows/build-user-confi"
  },
  {
    "path": ".github/workflows/keymap-drawer.yaml",
    "chars": 1214,
    "preview": "#     keymap -c config/config_keymap-drawer.yaml parse -c 12 -z config/corne.keymap > keymap-drawer/corne.yaml\n#     key"
  },
  {
    "path": ".gitignore",
    "chars": 699,
    "preview": "# zmk\nzmk/\n\n# sketchybar\nsketchybar/dotfiles/\nsketchybar/dotfiles\nsketchybar/dotfiles/*\n\n# MacOS\n.DS_Store\nvim-tools_not"
  },
  {
    "path": "CHANGELOG.txt",
    "chars": 2497,
    "preview": "Changelog file for Structures extra.\nhttps://github.com/mctechnology17/zmk-config/blob/main/CHANGELOG.txt\n\n# FEATURES 0."
  },
  {
    "path": "LICENSE",
    "chars": 1077,
    "preview": "MIT License\n\nCopyright (c) 2020 The ZMK Contributors\n\nPermission is hereby granted, free of charge, to any person obtain"
  },
  {
    "path": "Makefile",
    "chars": 16391,
    "preview": "# ========================================\n# FileName: Makefile\n# Date: 07.03.2023\n# Author: Marcos Chow Castro\n# Email:"
  },
  {
    "path": "README.md",
    "chars": 34593,
    "preview": "# MC Technology's zmk-config for corne - sofle - lily58\n\n[![MC Technology](https://github.com/mctechnology17/mctechnolog"
  },
  {
    "path": "boards/nice_nano.overlay",
    "chars": 1012,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/nice_nano_v2.overlay",
    "chars": 1012,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/nrfmicro_11.overlay",
    "chars": 1012,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi1_default: spi1_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/nrfmicro_11_flipped.overlay",
    "chars": 1012,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi1_default: spi1_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/nrfmicro_13.overlay",
    "chars": 1042,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi1_default: spi1_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/puchi_ble_v1.overlay",
    "chars": 1041,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/seeeduino_xiao_ble.overlay",
    "chars": 1298,
    "preview": "/*\nref: For future reference, this pinout shows both pin numberings https://files.seeedstudio.com/wiki/XIAO-BLE/pinout2."
  },
  {
    "path": "boards/shields/corne/Kconfig.defconfig",
    "chars": 910,
    "preview": "if SHIELD_CORNE_LEFT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_DONGLE_PRO_MICRO\n\nconfig ZMK_KEYBOARD_NAME\n    default "
  },
  {
    "path": "boards/shields/corne/Kconfig.shield",
    "chars": 503,
    "preview": "# Copyright (c) 2020 Pete Johanson\n# SPDX-License-Identifier: MIT\n\nconfig SHIELD_CORNE_LEFT\n    def_bool $(shields_list_"
  },
  {
    "path": "boards/shields/corne/boards/nice_nano.overlay",
    "chars": 979,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/corne/boards/nice_nano_v2.overlay",
    "chars": 979,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/corne/corne.conf",
    "chars": 207,
    "preview": "# Uncomment the following lines to enable the Corne RGB Underglow\n# CONFIG_ZMK_RGB_UNDERGLOW=y\n# CONFIG_WS2812_STRIP=y\n\n"
  },
  {
    "path": "boards/shields/corne/corne.dtsi",
    "chars": 3076,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/corne/corne.keymap",
    "chars": 3141,
    "preview": "// #include \"../../../corne.keymap\"\n\n/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n *"
  },
  {
    "path": "boards/shields/corne/corne.zmk.yml",
    "chars": 305,
    "preview": "file_format: \"1\"\nid: corne\nname: Corne\ntype: shield\nurl: https://github.com/foostan/crkbd/\nrequires: [pro_micro]\nexposes"
  },
  {
    "path": "boards/shields/corne/corne_dongle_pro_micro.conf",
    "chars": 796,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (pro_micro):\n# - nice_nano (no  probado)\n# - nice_nano_v2 (probad"
  },
  {
    "path": "boards/shields/corne/corne_dongle_pro_micro.overlay",
    "chars": 4895,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/corne/corne_dongle_xiao.conf",
    "chars": 586,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (xiao):\n# - seeeduino_xiao_ble (probado)\n\n### DONGLE MODE\nCONFIG_"
  },
  {
    "path": "boards/shields/corne/corne_dongle_xiao.overlay",
    "chars": 5994,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/corne/corne_left.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/corne/corne_left.overlay",
    "chars": 431,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"corne.dtsi\"\n\n&kscan0 {\n    col-"
  },
  {
    "path": "boards/shields/corne/corne_left_peripheral.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/corne/corne_left_peripheral.overlay",
    "chars": 431,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"corne.dtsi\"\n\n&kscan0 {\n    col-"
  },
  {
    "path": "boards/shields/corne/corne_right.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/corne/corne_right.overlay",
    "chars": 529,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"corne.dtsi\"\n\n&default_transform"
  },
  {
    "path": "boards/shields/lily58/Kconfig.defconfig",
    "chars": 815,
    "preview": "\nif SHIELD_LILY58_LEFT || SHIELD_LILY58_DONGLE_XIAO || SHIELD_LILY58_DONGLE_PRO_MICRO\n\nconfig ZMK_KEYBOARD_NAME\n    defa"
  },
  {
    "path": "boards/shields/lily58/Kconfig.shield",
    "chars": 513,
    "preview": "# Copyright (c) 2020 Pete Johanson\n# SPDX-License-Identifier: MIT\n\nconfig SHIELD_LILY58_LEFT\n    def_bool $(shields_list"
  },
  {
    "path": "boards/shields/lily58/boards/nice_nano.overlay",
    "chars": 979,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/lily58/boards/nice_nano_v2.overlay",
    "chars": 979,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/lily58/lily58.conf",
    "chars": 173,
    "preview": "# Uncomment to enable encoder\n# CONFIG_EC11=y\n# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y\n\n# Uncomment the following line to e"
  },
  {
    "path": "boards/shields/lily58/lily58.dtsi",
    "chars": 2900,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/lily58/lily58.keymap",
    "chars": 4622,
    "preview": "/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "boards/shields/lily58/lily58.zmk.yml",
    "chars": 299,
    "preview": "file_format: \"1\"\nid: lily58\nname: Lily58\ntype: shield\nurl: https://github.com/kata0510/Lily58\nrequires: [pro_micro]\nexpo"
  },
  {
    "path": "boards/shields/lily58/lily58_dongle_pro_micro.conf",
    "chars": 796,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (pro_micro):\n# - nice_nano (no  probado)\n# - nice_nano_v2 (probad"
  },
  {
    "path": "boards/shields/lily58/lily58_dongle_pro_micro.overlay",
    "chars": 4292,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/lily58/lily58_dongle_xiao.conf",
    "chars": 586,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (xiao):\n# - seeeduino_xiao_ble (probado)\n\n### DONGLE MODE\nCONFIG_"
  },
  {
    "path": "boards/shields/lily58/lily58_dongle_xiao.overlay",
    "chars": 5337,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/lily58/lily58_left.conf",
    "chars": 84,
    "preview": "# Uncomment to enable encoder\n# CONFIG_EC11=y\n# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y\n"
  },
  {
    "path": "boards/shields/lily58/lily58_left.overlay",
    "chars": 439,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"lily58.dtsi\"\n\n&kscan0 {\n    col"
  },
  {
    "path": "boards/shields/lily58/lily58_left_peripheral.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/lily58/lily58_left_peripheral.overlay",
    "chars": 439,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"lily58.dtsi\"\n\n&kscan0 {\n    col"
  },
  {
    "path": "boards/shields/lily58/lily58_right.conf",
    "chars": 1,
    "preview": "\n"
  },
  {
    "path": "boards/shields/lily58/lily58_right.overlay",
    "chars": 445,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"lily58.dtsi\"\n\n&default_transfor"
  },
  {
    "path": "boards/shields/sofle/Kconfig.defconfig",
    "chars": 930,
    "preview": "# Copyright (c) 2020 Ryan Cross\n# SPDX-License-Identifier: MIT\n\nif SHIELD_SOFLE_LEFT || SHIELD_SOFLE_DONGLE_XIAO || SHIE"
  },
  {
    "path": "boards/shields/sofle/Kconfig.shield",
    "chars": 500,
    "preview": "# Copyright (c) 2020 Ryan Cross\n# SPDX-License-Identifier: MIT\n\nconfig SHIELD_SOFLE_LEFT\n    def_bool $(shields_list_con"
  },
  {
    "path": "boards/shields/sofle/boards/nice_nano.overlay",
    "chars": 1025,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/sofle/boards/nice_nano_v2.overlay",
    "chars": 1025,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/sofle/boards/nrfmicro_11.overlay",
    "chars": 1025,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/sofle/boards/nrfmicro_13.overlay",
    "chars": 1025,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/sofle/sofle.conf",
    "chars": 612,
    "preview": "# Copyright (c) 2020 Ryan Cross\n# SPDX-License-Identifier: MIT\n\n# Uncomment the following line to enable the Sofle OLED "
  },
  {
    "path": "boards/shields/sofle/sofle.dtsi",
    "chars": 3191,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson, Ryan Cross\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/mat"
  },
  {
    "path": "boards/shields/sofle/sofle.keymap",
    "chars": 6906,
    "preview": "/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "boards/shields/sofle/sofle.zmk.yml",
    "chars": 329,
    "preview": "file_format: \"1\"\nid: sofle\nname: Sofle\ntype: shield\nurl: https://github.com/josefadamcik/SofleKeyboard\nrequires: [pro_mi"
  },
  {
    "path": "boards/shields/sofle/sofle_dongle_pro_micro.conf",
    "chars": 796,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (pro_micro):\n# - nice_nano (no  probado)\n# - nice_nano_v2 (probad"
  },
  {
    "path": "boards/shields/sofle/sofle_dongle_pro_micro.overlay",
    "chars": 5136,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/sofle/sofle_dongle_xiao.conf",
    "chars": 586,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (xiao):\n# - seeeduino_xiao_ble (probado)\n\n### DONGLE MODE\nCONFIG_"
  },
  {
    "path": "boards/shields/sofle/sofle_dongle_xiao.overlay",
    "chars": 5846,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/sofle/sofle_left.conf",
    "chars": 63,
    "preview": "# Copyright (c) 2020 Ryan Cross\n# SPDX-License-Identifier: MIT\n"
  },
  {
    "path": "boards/shields/sofle/sofle_left.overlay",
    "chars": 435,
    "preview": "/*\n * Copyright (c) 2020 Ryan Cross\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"sofle.dtsi\"\n\n&kscan0 {\n    col-gpi"
  },
  {
    "path": "boards/shields/sofle/sofle_left_peripheral.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/sofle/sofle_left_peripheral.overlay",
    "chars": 435,
    "preview": "/*\n * Copyright (c) 2020 Ryan Cross\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"sofle.dtsi\"\n\n&kscan0 {\n    col-gpi"
  },
  {
    "path": "boards/shields/sofle/sofle_right.conf",
    "chars": 63,
    "preview": "# Copyright (c) 2020 Ryan Cross\n# SPDX-License-Identifier: MIT\n"
  },
  {
    "path": "boards/shields/sofle/sofle_right.overlay",
    "chars": 483,
    "preview": "/*\n * Copyright (c) 2020 Ryan Cross\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"sofle.dtsi\"\n\n&default_transform {\n"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/Kconfig.defconfig",
    "chars": 1206,
    "preview": "# Copyright (c) 2023 The ZMK Contributors\n# SPDX-License-Identifier: MIT\n\nif SHIELD_SPLITKB_AURORA_SOFLE_LEFT || SHIELD_"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/Kconfig.shield",
    "chars": 660,
    "preview": "# Copyright (c) 2023 The ZMK Contributors\n# SPDX-License-Identifier: MIT\n\nconfig SHIELD_SPLITKB_AURORA_SOFLE_LEFT\n    de"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/boards/nice_nano.overlay",
    "chars": 977,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/boards/nice_nano_v2.overlay",
    "chars": 977,
    "preview": "#include <dt-bindings/led/led.h>\n\n&pinctrl {\n    spi3_default: spi3_default {\n        group1 {\n            psels = <NRF_"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.conf",
    "chars": 294,
    "preview": "# Uncomment these two line to add support for encoders to your firmware\n# CONFIG_EC11=y\n# CONFIG_EC11_TRIGGER_GLOBAL_THR"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.dtsi",
    "chars": 2645,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_t"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.keymap",
    "chars": 4925,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle.zmk.yml",
    "chars": 442,
    "preview": "file_format: \"1\"\nid: splitkb_aurora_sofle\nname: splitkb.com Aurora Sofle\ntype: shield\nurl: https://splitkb.com/products/"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_pro_micro.conf",
    "chars": 796,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (pro_micro):\n# - nice_nano (no  probado)\n# - nice_nano_v2 (probad"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_pro_micro.overlay",
    "chars": 4550,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_xiao.conf",
    "chars": 586,
    "preview": "# MC:\n# compatible con todas las versiones de nrf52840 (xiao):\n# - seeeduino_xiao_ble (probado)\n\n### DONGLE MODE\nCONFIG_"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_dongle_xiao.overlay",
    "chars": 5846,
    "preview": "/*\n * Copyright (c) 2020 Pete Johanson\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <dt-bindings/zmk/matrix_transfor"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left.overlay",
    "chars": 1028,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"splitkb_aurora_sofle.dts"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left_peripheral.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_left_peripheral.overlay",
    "chars": 1026,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"splitkb_aurora_sofle.dts"
  },
  {
    "path": "boards/shields/splitkb_aurora_sofle/splitkb_aurora_sofle_right.overlay",
    "chars": 1074,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include \"splitkb_aurora_sofle.dts"
  },
  {
    "path": "build.yaml",
    "chars": 11340,
    "preview": "# ========================================\n# FileName: build.yaml\n# Date: 07.06.2023\n# Author: Marcos Chow Castro\n# Emai"
  },
  {
    "path": "config/config_keymap-drawer.yaml",
    "chars": 11871,
    "preview": "# configuration for https://github.com/caksoylar/keymap-drawer\ndraw_config:\n  footer_text: 'Keymap View: <a href=\"https:"
  },
  {
    "path": "config/corne.conf",
    "chars": 4779,
    "preview": "# ========================================\n# FileName: corne.conf\n# Date: 07.06.2023\n# Author: Marcos Chow Castro\n# Emai"
  },
  {
    "path": "config/corne.keymap",
    "chars": 3860,
    "preview": "/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "config/keymap_german_mac_iso_zmk.h",
    "chars": 13396,
    "preview": "/* ========================================\nFileName: keymap_german_mac_iso_zmk.h\nDate: 15:17 23.September.2022\nAuthor: "
  },
  {
    "path": "config/lily58.conf",
    "chars": 4960,
    "preview": "# ========================================\n# FileName: corne.conf\n# Date: 07.06.2023\n# Author: Marcos Chow Castro\n# Emai"
  },
  {
    "path": "config/lily58.keymap",
    "chars": 4937,
    "preview": "/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "config/sofle.conf",
    "chars": 5026,
    "preview": "# ========================================\n# FileName: sofle.conf\n# Date: 03.01.2025\n# Author: Marcos Chow Castro\n# Emai"
  },
  {
    "path": "config/sofle.keymap",
    "chars": 5271,
    "preview": "/*\n * Copyright (c) 2020 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "config/splitkb_aurora_sofle.conf",
    "chars": 5101,
    "preview": "# ========================================\n# FileName: splitkb_aurora_sofle.conf\n# Date: 03.01.2025\n# Author: Marcos Cho"
  },
  {
    "path": "config/splitkb_aurora_sofle.keymap",
    "chars": 5213,
    "preview": "/*\n * Copyright (c) 2023 The ZMK Contributors\n *\n * SPDX-License-Identifier: MIT\n */\n\n#include <behaviors.dtsi>\n#include"
  },
  {
    "path": "config/west.yml",
    "chars": 863,
    "preview": "manifest:\n  remotes:\n    - name: zmkfirmware\n      url-base: https://github.com/zmkfirmware\n    # dongle_display\n    - n"
  },
  {
    "path": "keymap-drawer/corne.yaml",
    "chars": 1707,
    "preview": "layout: {qmk_keyboard: corne_rotated, layout_name: LAYOUT_split_3x6_3}\nlayers:\n  BAS: [↹, Q, W, E, R, T, Y, U, I, O, P, "
  },
  {
    "path": "keymap-drawer/lily58.yaml",
    "chars": 2168,
    "preview": "layout: {qmk_keyboard: lily58_rotated}\nlayers:\n  Bas: [Esc, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '`', ↹, Q,"
  },
  {
    "path": "keymap-drawer/sofle.yaml",
    "chars": 2419,
    "preview": "layout: {qmk_keyboard: sofle/rev1}\nlayers:\n  BAS: ['`', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', Esc, Q, W"
  },
  {
    "path": "keymap-drawer/splitkb_aurora_sofle.yaml",
    "chars": 2273,
    "preview": "layout: {qmk_keyboard: sofle/rev1}\nlayers:\n  BAS: [Esc, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '`', ↹, Q, W, "
  },
  {
    "path": "snippets/common-config/common-config.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "snippets/common-config/snippet.yml",
    "chars": 69,
    "preview": "name: common-config\r\nappend:\r\n  EXTRA_CONF_FILE: common-config.conf\r\n"
  },
  {
    "path": "snippets/dongle-config/dongle-config.conf",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "snippets/dongle-config/snippet.yml",
    "chars": 69,
    "preview": "name: dongle-config\r\nappend:\r\n  EXTRA_CONF_FILE: dongle-config.conf\r\n"
  },
  {
    "path": "snippets/rgb-config/rgb-config.conf",
    "chars": 893,
    "preview": "### RGB UNDERGLOW\r\nCONFIG_ZMK_RGB_UNDERGLOW=y\r\nCONFIG_WS2812_STRIP=y\r\n# 0\tSolid color    1 Breathe     2\tSpectrum     3\t"
  },
  {
    "path": "snippets/rgb-config/snippet.yml",
    "chars": 63,
    "preview": "name: rgb-config\r\nappend:\r\n  EXTRA_CONF_FILE: rgb-config.conf\r\n"
  },
  {
    "path": "zephyr/module.yml",
    "chars": 57,
    "preview": "build:\n  settings:\n    board_root: .\n    snippet_root: .\n"
  }
]

// ... and 21 more files (download for full content)

About this extraction

This page contains the full source code of the mctechnology17/zmk-config GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 132 files (250.2 KB), approximately 88.9k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!