Corne with display dongle full compilation

This commit is contained in:
mctechnology17 2024-08-21 17:25:04 +02:00 committed by github-actions[bot]
parent 44e05230cf
commit 95d732af57
92 changed files with 5264 additions and 1881 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
*.dtsi linguist-language=C++
*.keymap linguist-language=C++

25
.github/workflows/keymap-drawer.yaml vendored Normal file
View file

@ -0,0 +1,25 @@
# 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'"

12
.gitignore vendored
View file

@ -1,10 +1,16 @@
Makefile
build/justin/*
# 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
@ -72,7 +78,7 @@ node_modules
*.pyc
.idea/
/.idea
build/
# build/
__pycache__
# Rust

509
Makefile Normal file
View file

@ -0,0 +1,509 @@
# ========================================
# 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
# Board: 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.5
# extra_conf_file_oled_rgb= -DEXTRA_CONF_FILE=${PWD}/config/config_ready/nice/oled_rgb/corne.conf
### config
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 zmk:/zmk \
--volume "${config}:/zmk-config: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_ble_v1= \
west build /zmk/app \
--pristine --board "${puchi}"
west_built_nice_nano_v2= \
west build /zmk/app \
--pristine --board "${nice}"
west_built_seeeduino_xiao_ble= \
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=/zmk/build/zephyr/zmk.uf2 \
firmware/puchi_corne_left_peripheral.uf2
uf2_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
# many times you cannot copy the uf2 file so try this solution
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=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
codebase_default:
docker run ${docker_opts} sh -c '\
git clone https://github.com/zmkfirmware/zmk /zmk/; \
west init -l /zmk/app/; \
west update'
codebase_urob:
docker run ${docker_opts} sh -c '\
git clone https://github.com/urob/zmk /zmk/; \
west init -l /zmk/app/; \
west update'
### CODEBASE_DEFAULT START
### CODEBASE_DEFAULT END
### CODEBASE_UROB START
xiao_corne_dongle_rgbled_adapter_urob:
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao_rgbled_adapter} \
${keyboard_name_xiao_dongle}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_rgbled_adapter}
${uf2_chmod_xiao_corne_dongle_xiao_rgbled_adapter}
xiao_corne_dongle_urob:
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao_dongle_display} \
${keyboard_name_xiao_dongle_oled}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_dongle_display}
${uf2_chmod_xiao_corne_dongle_xiao_dongle_display}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_view} \
${keyboard_name_nice}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_view}
${uf2_chmod_nice_corne_left_peripheral_view}
only_xiao_dongle_urob:
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao_dongle_display} \
${keyboard_name_xiao_dongle_oled}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_dongle_display}
${uf2_chmod_xiao_corne_dongle_xiao_dongle_display}
only_nice_dongle_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_nice_dongle_oled}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_nice_corne_dongle_pro_micro_dongle_display}
only_puchi_dongle_urob:
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_puchi_dongle_oled}
docker cp ${urob}:${uf2_copy_puchi_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_puchi_corne_dongle_pro_micro_dongle_display}
only_dongle_urob: only_xiao_dongle_urob only_nice_dongle_urob only_puchi_dongle_urob
@echo "only dongle urob and not other shields"
corne_dongle_pro_micro_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro} \
${keyboard_name_nice_dongle}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro}
${uf2_chmod_nice_corne_dongle_pro_micro}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_nice_dongle_oled}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_nice_corne_dongle_pro_micro_dongle_display}
corne_dongle_pro_micro_display_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro} \
${keyboard_name_nice_dongle}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro}
${uf2_chmod_nice_corne_dongle_pro_micro}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_nice_dongle_oled}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_nice_corne_dongle_pro_micro_dongle_display}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left} \
${keyboard_name_nice_oled}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_peripheral_oled}
docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_oled}
${uf2_chmod_nice_corne_left_peripheral_oled}
# full compilation
corne_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_view} \
${keyboard_name_nice}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_view} \
${keyboard_name_puchi_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left}
${uf2_chmod_puchi_corne_left}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_puchi_corne_right}
${uf2_chmod_puchi_corne_right}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_view}
${uf2_chmod_nice_corne_left_peripheral_view}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left_peripheral}
${uf2_chmod_puchi_corne_left_peripheral}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao} \
${keyboard_name_xiao_dongle}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao}
${uf2_chmod_xiao_corne_dongle_xiao}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao_dongle_display} \
${keyboard_name_xiao_dongle_oled}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao_dongle_display}
${uf2_chmod_xiao_corne_dongle_xiao_dongle_display}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro} \
${keyboard_name_nice_dongle}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro}
${uf2_chmod_nice_corne_dongle_pro_micro}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_nice_dongle_oled}
docker cp ${urob}:${uf2_copy_nice_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_nice_corne_dongle_pro_micro_dongle_display}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_dongle_pro_micro} \
${keyboard_name_puchi_dongle}
docker cp ${urob}:${uf2_copy_puchi_corne_dongle_pro_micro}
${uf2_chmod_puchi_corne_dongle_pro_micro}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_dongle_pro_micro_dongle_display} \
${keyboard_name_puchi_dongle_oled}
docker cp ${urob}:${uf2_copy_puchi_corne_dongle_pro_micro_dongle_display}
${uf2_chmod_puchi_corne_dongle_pro_micro_dongle_display}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_nice_corne_settings_reset}
${uf2_chmod_nice_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_xiao_corne_settings_reset}
${uf2_chmod_xiao_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_puchi_corne_settings_reset}
${uf2_chmod_puchi_corne_settings_reset}
corne_view_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_view} \
${keyboard_name_nice}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_view} \
${keyboard_name_puchi_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left}
${uf2_chmod_puchi_corne_left}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_puchi_corne_right}
${uf2_chmod_puchi_corne_right}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_view}
${uf2_chmod_nice_corne_left_peripheral_view}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left_peripheral}
${uf2_chmod_puchi_corne_left_peripheral}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_xiao_corne_dongle_xiao} \
${keyboard_name_xiao_dongle}
docker cp ${urob}:${uf2_copy_xiao_corne_dongle_xiao}
${uf2_chmod_xiao_corne_dongle_xiao}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_nice_corne_settings_reset}
${uf2_chmod_nice_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_xiao_corne_settings_reset}
${uf2_chmod_xiao_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_puchi_corne_settings_reset}
${uf2_chmod_puchi_corne_settings_reset}
nice_corne_view_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_view} \
${keyboard_name_nice}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
corne_left_peripheral_view_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_peripheral_view}
docker cp ${urob}:${uf2_copy_nice_corne_left_peripheral_view}
${uf2_chmod_nice_corne_left_peripheral_view}
nice_corne_view_left_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left_view} \
${keyboard_name_nice}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
nice_corne_view_right_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
nice_corne_oled_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_left} \
${keyboard_name_nice_oled}
docker cp ${urob}:${uf2_copy_nice_corne_left}
${uf2_chmod_nice_corne_left}
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_corne_right}
docker cp ${urob}:${uf2_copy_nice_corne_right}
${uf2_chmod_nice_corne_right}
puchi_corne_view_urob:
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_view} \
${keyboard_name_puchi_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left}
${uf2_chmod_puchi_corne_left}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_puchi_corne_right}
${uf2_chmod_puchi_corne_right}
puchi_corne_view_left_urob:
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left_view} \
${keyboard_name_puchi_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left}
${uf2_chmod_puchi_corne_left}
puchi_corne_view_right_urob:
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_right_view}
docker cp ${urob}:${uf2_copy_puchi_corne_right}
${uf2_chmod_puchi_corne_right}
puchi_corne_oled_urob:
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_left} \
${keyboard_name_puchi_view}
docker cp ${urob}:${uf2_copy_puchi_corne_left}
${uf2_chmod_puchi_corne_left}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_corne_right}
docker cp ${urob}:${uf2_copy_puchi_corne_right}
${uf2_chmod_puchi_corne_right}
reset_urob:
docker run --rm ${docker_opts} \
${west_built_nice_nano_v2} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_nice_corne_settings_reset}
${uf2_chmod_nice_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_seeeduino_xiao_ble} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_xiao_corne_settings_reset}
${uf2_chmod_xiao_corne_settings_reset}
docker run --rm ${docker_opts} \
${west_built_puchi_ble_v1} ${shield_settings_reset}
docker cp ${urob}:${uf2_copy_puchi_corne_settings_reset}
${uf2_chmod_puchi_corne_settings_reset}
### 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:
docker ps -aq --filter name='^zmk' | xargs -r docker container rm
docker volume list -q --filter name='zmk' | xargs -r docker volume rm
clean_docker:
docker ps -aq --filter name='^zmk' | xargs -r docker container rm
docker volume list -q --filter name='zmk' | xargs -r docker volume rm
clean_firmware:
find firmware/*.uf2 -type f -delete

591
README.md
View file

@ -5,245 +5,456 @@
<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="@mctechnology17 | Twitter" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/twitter.png" />][twitter]
[<img align="center" alt="@mctechnology17 | Instagram" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/instagram.png" />][instagram]
[<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="@mctechnology17 | Reddit" width="22px" src="https://github.com/mctechnology17/mctechnology17/blob/main/src/reddit.png" />][reddit]
[<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)
- [QUE CONTIENE ESTA CONFIGURACION?](#QUE-CONTIENE-ESTA-CONFIGURACION?)
- [DIFERENCIA ENTRE PUCHI-BLE Y NICE!NANO](#DIFERENCIA-ENTRE-PUCHI-BLE-Y-NICE!NANO)
- [INSTALACION](#INSTALACION)
- [MODO SUSPENCION](#MODO-SUSPENCION)
- [PANTALLA OLED](#PANTALLA-OLED)
- [QUICK START](#QUICK-START)
- [LOCAL INSTALLATION](#LOCAL-INSTALLATION)
- [DISPLAY](#DISPLAY)
- [RGB](#RGB)
- [OTROS CONSEJOS IMPORTANTES](#OTROS-CONSEJOS-IMPORTANTES)
- [DONACION](#DONACION)
- [LICENSE](#LICENSE)
- [DONGLE](#DONGLE)
- [USEFUL TIPS](#USEFUL-TIPS)
- [RELATED PROJECTS](#RELATED-PROJECTS)
- [DONGLE DESIGNS](#DONGLE-DESIGNS)
- [INSPIRATIONS](#INSPIRATIONS)
- [MY OTHER PROJECTS](#MY-OTHER-PROJECTS)
----
If you already have your corne configured with this repository and want to make
a modification to your keymap, you can do it with the online [keymap-editor](https://nickcoutsos.github.io/keymap-editor/).
# INTRO
Esta es mi configucion personal de mis teclados corne inalambricos con [ZMK firmware](https://github.com/zmkfirmware/zmk/).
Testeado con [nice!nano_v2](https://nicekeyboards.com/nice-nano) y [Puchi-BLE](https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller-pro-micro-replacement?number=KC10157_SWITCH&c=18).
[![nicenano_v2](https://github.com/mctechnology17/mctechnology17/blob/main/src/nicenanov2.GIF)](https://nicekeyboards.com/nice-nano/)
> **Warning**
> [!CAUTION]
>
> NO SOY RESPONSABLE DE NINGÚN DAÑO QUE ESTE CÓDIGO PUEDA CAUSAR, ÚSALO BAJO TU PROPIO RIESGO..
> I AM NOT RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE, USE IT AT YOUR OWN
> RISK.
> **Note**
> [!NOTE]
>
> NO DUDES EN MODIFICAR EL CÓDIGO A TU GUSTO O UTILIZAR LO QUE NECESITES.
>
> 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.
| Pros |
|-----------------------------------------------------------------|
| movilidad y flexibilidad |
| reducción de tensión y fatiga (ergonómica y ortolineal) |
| productividad mejorada |
| conexión bluetooth y usb-c |
| Programable altamente personalizable con el software zmk. |
| compatibilidad con linux, windows, macos, android, ios y más |
| completamente inalámbrico entre las dos mitades y con la pc |
| Consumo ultrabajo. extiende la duración de la batería al límite |
| arrastrar y soltar gracias al gestor de arranque uf2 incluido |
| no se requiere software adicional para flashear |
| soporte para múltiples dispositivos (hasta 5) |
| teclas del mouse |
| RGB |
| Macros |
| Tap dance |
| Combos |
| hasta 1 semana de uso sin cargador (con 100mah) |
| soporte de pantalla [nice-view] y pantalla oled |
| Editor en línea para el mapa de teclas. ver [keymap-editor] |
The objective of this repository is to serve as a base for configuring your
Corne 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 configurations, featuring a setup for
the Corne dongle with/without an OLED screen.
You can also use your keyboard without a dongle of course. with any of the
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 |
| y más... |
| 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... |
# QUE CONTIENE ESTA CONFIGURACION?
- [x] [ZMK firmware](https://zmk.dev/docs/user-setup)
- [x] Compatibilidad con [nice!nano_v2](https://nicekeyboards.com/nice-nano/)
- [x] Compatibilidad con [Puchi-BLE](https://keycapsss.com/keyboard-parts/mcu-controller/202/puchi-ble-wireless-microcontroller-pro-micro-replacement?number=KC10157_SWITCH&c=18)
- [x] Macros o tab dance
- [x] Combos
- [x] RGB underglow and backlight + efectos de animación
- [x] Pantalla OLED
- [x] Pantalla [nice-view]
- [x] Animaciones con [nice-view] como Bongo cat, cohete, etc.
- [x] Modo suspensión
- [x] Soporte para múltiples dispositivos (hasta 5)
- [x] Teclas del mouse
- [x] Teclas smart especiales
- [x] Capa Lock virtual
- [x] reset virtual por cada mitad
- [x] bootloader virtual por cada mitad
- [x] nombre por cada capa
- [x] Capa de simbolos en linux, windows y macos
- [] Editor en línea para el mapa de teclas. ver [keymap-editor]
# QUICK START
> [!NOTE]
>
> 1. With this configuration you can use the corne 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.
1. Fork this repository (I appreciate if you follow me on [github] and [youtube])
2. Modify the keyboard mapping with [keymap-editor]. If you want to read about
the features of this editor you can do so
[here](https://github.com/nickcoutsos/keymap-editor).
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-drawer-demo](keymap-drawer/corne.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]
[![demo](src/demo.GIF)](https://www.youtube.com/c/mctechnology17)
# LOCAL INSTALLATION
Before making any modifications, please see the [ZMK documentation]
documentation.
# DIFERENCIA ENTRE PUCHI BLE Y NICE!NANO
- Módulo bluetooth certificado (ce, fcc y rohs)
- Antena cerámica optimizada para alta intensidad de señal y bajos niveles de interferencia.
- Interruptor de encendido/apagado para prolongar la vida útil de la batería (solo variante con interruptor)
- Open Source
Example of an advanced configuration hier -> [^4]
# INSTALACION
¿De dónde sacas la información? -> [referencia a documentos zmk](https://zmk.dev/docs/user-setup)
Below is a list of features currently included in this branch[^5] _on top of_
the official ZMK master branch.
Pre requirements:
- Tener instalado [git](https://github.com/git-guides/install-git) en tu computadora y una cuenta en [github](https://github.com/)
- Crear un nuevo repositorio en github. [Para crear un nuevo repositorio dale click aqui](https://github.com/new)
- Cuando se te solicite el nombre del repositorio, ingresa zmk-config (puede ser otro nombre tambien).
- El repositorio puede ser público o privado
- No marcar ninguna de las opciones para inicializar el repositorio con un README u otros archivos.
- Haz clic en "Crear repositorio"
- Opcional tener instalado en tu computadora VSC (Visual Studio Code)
u otro editor de texto de tu preferencia, yo uso `nvim/vim`
- Opcional puedes de preferencia usar `git` con SSH
eso te evitara tener que poner tu usuario y contraseña cada vez que tengas que hacer un `git push`
en otras palabras despues de cada modificacion que le hagas al codigo
- **pointer movement/scrolling** - PR #2027
- **tri-state (aka swapper)** - PR [#1366](https://github.com/zmkfirmware/zmk/pull/1366)
- **smart-word** (PR [#1451](https://github.com/zmkfirmware/zmk/pull/1451))
- **on-release-for-tap-preferred** - [tweak](https://github.com/celejewski/zmk/commit/d7a8482712d87963e59b74238667346221199293) by Andrzej
- **zen-tweaks** - [display & battery improvements](https://github.com/caksoylar/zmk/tree/caksoylar/zen-v1%2Bv2) by Cem Aksoylar
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
# 0. crea una repositorio con el nombre de zmk-config en tu cuenta de github
# 1. luego abre la terminal y pega esto:
bash -c "$(curl -fsSL https://zmk.dev/setup.sh)"
# 2. se abre una opcion con muchos teclados, seleciona el 13 (corne)
13 # enter
# 3. se abre una opcion a elegir el MCU (Microcontrolador), seleciona el 4 (nice!nano v2)
4 # enter
# 4. ¿Copiar en el mapa de teclas estándar para personalizarlo? [Yn]:
Y # enter
# 5. Datos de tu GitHub
mctechnology17 # AQUI TU USUARIO DE GITHUB
CONTRASEÑA # AQUI TU CONTRASEÑA DE GITHUB
# 6. Nombre del repositorio
ENTER # simplemente enter, dejamos la por defecto zmk-config
# 7. insertar el repositorio
git@github.com:mctechnology17/zmk-config.git # mctechnology17 -> AQUI TU USUARIO DE GITHUB
# 8. Continuar?
Y # enter
```
Despues de concluir los pasos anteriores con exito, puedes ir a la ruta dinde se encuentra el repositorio
con el siguiente comando y modificar el codigo a tu gusto:
```bash
cd ~/zmk-config/config
# vista de como esta estructurado el repositorio
zmk-config # carpeta principal
├── build.yaml # archivo de configuracion para el compilado NO MODIFICAR
├── config # carpeta de configuracion
│ ├── corne.conf # archicho de configuracios de las macros
│ ├── corne.keymap # archicho de configuracios de las teclas
│ └── west.yml # config para conectarse con https://github.com/zmkfirmware NO MODIFICAR
└── README.md
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
├── config # configuration folder
│   ├── boards
│   │   ├── ... # other boards
│   │   ├── nice_nano_v2.overlay
│   │   ├── puchi_ble_v1.overlay
│   │   └── shields
│   │   ├── corne
│   │   │   ├── Kconfig.defconfig # modify if you want to add a new shield
│   │   │   ├── Kconfig.shield # modify if you want to add a new shield
│   │   │   ├── boards
│   │   │   │   ├── ... # other boards
│   │   │   ├── corne.conf # general configurations of the corne
│   │   │   ├── corne.dtsi # default dtsi
│   │   │   ├── corne.keymap # default keymap
│   │   │   ├── corne.zmk.yml # modify if you want to add a new shield
│   │   │   ├── corne_dongle_pro_micro.conf # conf dongle pro_micro pinout
│   │   │   ├── corne_dongle_pro_micro.overlay # properties/displays dongle
│   │   │   ├── corne_dongle_xiao.conf # conf dongle xiao pinout
│   │   │   ├── corne_dongle_xiao.overlay # properties/displays dongle
│   │   │   ├── corne_left.conf # conf left
│   │   │   ├── corne_left_peripheral.conf # config left peripheral
│   │   │   ├── corne_right.conf # conf right
│   │   │   ├── ... # other files
│   │   └── dongle_display
│   │      ├── ... # here you can modify the screen widgets
│   │      └── widgets
│   │      └── # here you can modify the screen widgets
│   ├── 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
```
Si no modificaste nada puedes simplemente ir a tu repositorio en github y dale a refrescar a la pagina.
To compile with make, just run the following command:
Ahora ve a esta ruta en tu repositorio de github:
- Actions(click) -> All Workflows (click)-> Initial User Config. (aqui haces scroll hasta abajo y click)
- Aqui hay algo que se llama Artifacts, dale click para descargar el archivo, es un .zip
> [!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.
Ahora ve a descarga en tu computadora(o donde tengas por defecto las descargas):
- Descomprime el archivo .zip
- Conecta el microcontrolador nice!nano v2 al puerto usb-c de tu computadora
- El microcontrolador se reconocera como un dispositivo de almacenamiento
- Copia el archivo corne_left-nice_nano_v2-zmk.uf2 que descomprimiste en la carpeta del dispositivo de almacenamiento
- Conecta el otro microcontrolador nice!nano v2 al puerto usb-c de tu computadora
- Ahora copia el otro archivo corne_right-nice_nano_v2-zmk.uf2 que descomprimiste en la carpeta del dispositivo de almacenamiento
- Listo, ya tienes tu teclado corne configurado con la configuracion estandar de ZMK
- Ahora puedes modificar el codigo a tu gusto y volver a compilarlo
Si quieres usar mi configuracion solo debes clonar este repositorio y reemplazar los archivos `corne.conf` y `corne.keymap`
que se encuentran en la siguiente ruta:
```bash
zmk-config # carpeta principal
├── config # carpeta de configuracion
│ ├── corne.conf # archicho de configuracios de las macros
│ ├── corne.keymap # archicho de configuracios de las teclas
```
# MODO SUSPENCION
En el archicho de configuracios de las macros [corne.conf](./config/corne.conf) puedes poner la siguiente macro:
```make
CONFIG_ZMK_SLEEP=y
```
Esta macro te permite poner el teclado en modo de suspencion, para despertarlo solo debes presionar cualquier tecla.
Es muy util para preservar la vida de la bateria.
```bash
zmk-config # carpeta principal
├── config # carpeta de configuracion
│ ├── corne.conf # archicho de configuracios de las macros
```
ESTA MACRO NO VIENE POR DEFECTO EN LA CONFIGURACION ESTANDAR DE ZMK, POR LO QUE DEBES AGREGARLA TU MISMO.
```bash
# activar por 30 minutos (30*60*1000ms)
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
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 [nice-view]
- the [nice-view] screen is compiled by default in this repository.
2. OLED
- 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.
> [!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>;
};
};
```
# PANTALLA OLED
El OLED ya esta soportado asi que puedes usarlo sin problemas en esta
configuracion. Puedes ver un ejemplo que funciona en el siguiente archivo:
[corne.conf](./config/config_ready/nice/oled_rgb/corne.conf):
# RGB
El RGB con oled ya esta soportado asi que puedes usarlo sin problemas en esta
configuracion. Simplemete debes agregar habilitarlo en, esta habilitado por
defecto para 42 teclas y 12 LEDs por debajo. Puedes ver un ejemplo que funciona
en el siguiente archivo:
[corne.conf](./config/config_ready/nice/oled_rgb/corne.conf):
> [!WARNING]
>
> 1. If you use [nice-view] you cannot use rgb, since [nice-view] uses the same
> pinout as rgb.
# OTROS CONSEJOS IMPORTANTES
- Puedes agregar una tecla de reset en cada mitad, eso es util para cuando se te desconecten/desincronicen las mitades, o pase algo inusual. De esa manera se carga el firmware de nuevo. Ver referencia en [corne.keymap](./config/corne.keymap)
- Puedes agregar un activador de bootloader en cada mitad en caso de que no tengas acceso al boton de bootloader, es util en caso de que tu carcasa no este optimizada o de que simplemente quiera esa opcion. Ver referencia en [corne.keymap](./config/corne.keymap)
- Si se te desconectaron/desincronizaron ambas mitades solo tienes que presionar el boton de reset de ambas mitades 10 veces seguidas y se volveran a conectar.
- Si quires volver a flashar el firware solo tienes que conectar el teclado(osea una mitad primero, normalmente la izquierda) presionar el boton de reset 2 veces seguidas
y tu dispositivo se reconocera como una unidad de almecenamiento de disco duro, luego solo arrastra el archivo a flashear y listo. Haz lo mismo con la otra mitad.
- Recuerda que si tu corne solo tiene algunas luces RGB funcionales puedes activar solo las que tengas funcionales, no es necesario que actives todas las luces. Ver referencia en [led_strip](./config/corne.keymap)
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.
# DONACION
Si disfrutas de mi trabajo, siéntete libre de donar o convertirte en patrocinador.
Here is an example of what it looks like:
[![rgb-demo](src/demo.GIF)](https://www.youtube.com/c/mctechnology17)
# 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.
Macro example to enter bootloader mode. On your
[corne.keymap](./config/corne.keymap) file you can add the following macro (Thanks @chadtrans for the tip!):
> [!TIP]
>
> 1. You can program this macro with the online editor [keymap-editor]
```c
// this is the manual way to do it
#define MACRO(name, keys) \
name: name##_macro { \
compatible = "zmk,behavior-macro";\
#binding-cells = <0>; \
tap-ms = <1>; \
wait-ms = <1>; \
bindings = <keys>; \
};
MACRO(dongle_boot, &bootloader)
/ {
keymap {
compatible = "zmk,keymap";
config_layer {
display-name = "CON";
bindings = <
... // other bindings
&dongle_boot
... // other bindings
};
```
# USEFUL TIPS
> [!TIP]
>
> Below are some useful tips for using your corne 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 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.
# 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)
# 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:
- [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]
Emsamblador y creador/mantenedor de vimtools, GitManager y más,
que son herramientas de trabajo fáciles de integrar, pero muy potentes que te permiten
mejore su flujo de trabajo, integrándose con todos los sistemas operativos y todas las
shells(zsh, fish, bash, etc.) posibles.
Aquí puedes ver otros proyecto publicado recientemente:
- [vimtools] navaja suiza para vim (funciones y configuraciones que te facilitarán la vida)
- [gm] administrador multiplataforma GIT con una interfaz de usuario amigable
- [vim-better-header] la mejor plantilla automatizada
- [vim-executor] Ejecutador de código multilenguaje
# 🏆 Trofeos de perfil de GitHub
[![trophy](https://github-profile-trophy.vercel.app/?username=mctechnology17&no-frame=true&theme=onedark&rank=SECRET,SSS,SS,S,AAA,AA,A)](https://github.com/ryo-ma/github-profile-trophy)
# [LICENSE](LICENSE)
Released under the MIT License
Copyright (c) 2020 The ZMK Contributors
[^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

View file

@ -49,15 +49,82 @@
# 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:
- board: nice_nano_v2 # puchi_ble_v1 nice_nano_v2
shield: corne_left nice_view_adapter nice_view # con display
# shield: corne_left # con OLED display
# - board: puchi_ble_v1 # puchi_ble_v1 nice_nano_v2
- board: nice_nano_v2 # puchi_ble_v1 nice_nano_v2
shield: corne_right nice_view_adapter nice_view # con display
# shield: corne_right # con OLED display
# - board: puchi_ble_v1 # puchi_ble_v1 nice_nano_v2
# - board: puchi_ble_v1
# shield: settings_reset
# nice
- board: nice_nano_v2
shield: corne_left nice_view_adapter nice_view
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Corne_View\"
artifact-name: nice_corne_left
# shield: corne_left # for OLED no nice_view
- board: nice_nano_v2
shield: corne_right nice_view_adapter nice_view
artifact-name: nice_corne_right
# shield: corne_right # for OLED no nice_view
# puchi
- board: puchi_ble_v1
shield: corne_left nice_view_adapter nice_view
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Corne_View\"
artifact-name: puchi_corne_left
# shield: corne_left # for OLED no nice_view
- board: puchi_ble_v1
shield: corne_right nice_view_adapter nice_view
artifact-name: puchi_corne_right
# shield: corne_right # for OLED no nice_view
# peripheral_left
- board: nice_nano_v2
shield: corne_left_peripheral nice_view_adapter nice_view
artifact-name: nice_corne_left_peripheral
- board: puchi_ble_v1
shield: corne_left_peripheral nice_view_adapter nice_view
artifact-name: puchi_corne_left_peripheral
# Xiao_Dongle
- board: seeeduino_xiao_ble
shield: corne_dongle_xiao
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle\"
artifact-name: xiao_corne_dongle_xiao
snippet: zmk-usb-logging
- board: seeeduino_xiao_ble
shield: corne_dongle_xiao dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Xiao_Dongle_O\"
artifact-name: xiao_corne_dongle_xiao_dongle_display
snippet: zmk-usb-logging
# ProMicro_Dongle
- board: nice_nano_v2
shield: corne_dongle_pro_micro
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle\"
artifact-name: nice_corne_dongle_pro_micro
snippet: zmk-usb-logging
- board: nice_nano_v2
shield: corne_dongle_pro_micro dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Nice_Dongle_O\"
artifact-name: nice_corne_dongle_pro_micro_dongle_display
snippet: zmk-usb-logging
- board: puchi_ble_v1
shield: corne_dongle_pro_micro
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle\"
artifact-name: puchi_corne_dongle_pro_micro
snippet: zmk-usb-logging
- board: puchi_ble_v1
shield: corne_dongle_pro_micro dongle_display
cmake-args: -DCONFIG_ZMK_KEYBOARD_NAME=\"Puchi_Dongle_O\"
artifact-name: puchi_corne_dongle_pro_micro_dongle_display
snippet: zmk-usb-logging
# settings_reset
- 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

BIN
config/boards/.DS_Store.gz Normal file

Binary file not shown.

View file

@ -0,0 +1,47 @@
#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:

View file

@ -0,0 +1,47 @@
#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:

View file

@ -25,7 +25,6 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
@ -45,3 +44,4 @@
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,47 @@
#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:

View file

@ -25,7 +25,7 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
// label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
@ -45,3 +45,5 @@
zmk,underglow = &led_strip;
};
};
// vim: filetype=dts fdm=marker:

View file

@ -25,14 +25,14 @@
led_strip: ws2812@0 {
compatible = "worldsemi,ws2812-spi";
label = "WS2812";
// label = "WS2812";
/* SPI */
reg = <0>; /* ignored, but necessary for SPI bindings */
spi-max-frequency = <4000000>;
/* WS2812 10 default, cambie a 54*/
chain-length = <27>; /* There are per-key RGB, but the first 6 are underglow */
/* WS2812 */
chain-length = <10>; /* arbitrary; change at will */
spi-one-frame = <0x70>;
spi-zero-frame = <0x40>;

View file

@ -0,0 +1,54 @@
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
config ZMK_USB
default y
endif
if SHIELD_CORNE_LEFT || SHIELD_CORNE_RIGHT || SHIELD_CORNE_DONGLE_XIAO || SHIELD_CORNE_LEFT_PERIPHERAL || 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

View file

@ -0,0 +1,17 @@
# 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)

View file

@ -0,0 +1,46 @@
#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;
};
};

View file

@ -0,0 +1,46 @@
#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;
};
};

View file

@ -0,0 +1,6 @@
# 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

View file

@ -0,0 +1,83 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zephyr,display = &oled;
zmk,kscan = &kscan0;
zmk,matrix-transform = &default_transform;
};
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>;
};
};

View file

@ -0,0 +1,58 @@
// #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
>;
};
};
};

View file

@ -0,0 +1,17 @@
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
siblings:
- corne_left
- corne_right
- corne_left_peripheral
- corne_dongle_xiao
- corne_dongle_pro_micro

View file

@ -0,0 +1,49 @@
# MC:
# compatible with all versions of nrf52840 (pro micro):
# - nice_nano (not tested)
# - nice_nano_v2 (tested)
# - nice_nano_v2 (super mini -> nice_nano_v2 clon) (tested)
# - nrfmicro_11 (not tested)
# - nrfmicro_11_flipped (not tested)
# - nrfmicro_13 (not tested)
# - puchi_ble_v1 (tested)
# 3 profiles (n+2)
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5
# dongle mode
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
# display
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# enable logging and configure zmk logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
# the battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
# MC: changed so that he always stays awake
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve the
# problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
# change default keyboard display name
# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled"
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -0,0 +1,153 @@
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &mock_kscan;
zmk,matrix-transform = &default_transform;
zephyr,display = &oled;
};
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)
>;
};
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:

View file

@ -0,0 +1,43 @@
# MC:
# compatible with all versions of nrf52840 (xiao):
# - seeeduino_xiao_ble (tested)
# 3 profiles (n+2)
CONFIG_BT_MAX_CONN=5
CONFIG_BT_MAX_PAIRED=5
# dongle mode
CONFIG_ZMK_SPLIT_BLE_CENTRAL_PERIPHERALS=2
# display
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# enable logging and configure zmk logging to debug output
# CONFIG_ZMK_USB_LOGGING=y
# CONFIG_LOG_PROCESS_THREAD_STARTUP_DELAY_MS=8000
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
# the battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
# MC: changed so that he always stays awake
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve the
# problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
# change default keyboard display name
# CONFIG_ZMK_KEYBOARD_NAME="Nice_Dongle_Oled"
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -0,0 +1,184 @@
/*
* Copyright (c) 2020 Pete Johanson
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
zmk,kscan = &mock_kscan;
zmk,matrix-transform = &default_transform;
zephyr,display = &oled;
};
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)
>;
};
mock_kscan: kscan_0 {
compatible = "zmk,kscan-mock";
// wakeup-source;
columns = <0>;
rows = <0>;
events = <0>;
};
// TODO: per-key RGB node(s)?
};
&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>;
};
};
/*
// 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>;
};
};
// TODO: niceview
&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>,
<NRF_PSEL(SPIM_MOSI, 0, 4)>,
<NRF_PSEL(SPIM_MISO, 0, 8)>;
};
};
spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 5)>, // D5
<NRF_PSEL(SPIM_MOSI, 0, 4)>, // D4
<NRF_PSEL(SPIM_MISO, 0, 8)>;
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 = <&gpio1 11 GPIO_ACTIVE_HIGH>; // D6
};
*/
// vim: filetype=dts fdm=marker:

View file

@ -0,0 +1,43 @@
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
### MOUSE
CONFIG_ZMK_MOUSE=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,18 @@
/*
* 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>
;
};

View file

@ -0,0 +1,38 @@
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# Disable other widgets, because don't work with pheripherals
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,18 @@
/*
* 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>
;
};

View file

@ -0,0 +1,38 @@
# Increase the bluetooth transmission power
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_BLE_EXPERIMENTAL_FEATURES=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### POWER OPTIONS
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=n
# 1800000 milisegundos = 30 minutos * 60 segundos * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# Enable and adjust nice!view
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# Disable other widgets, because don't work with pheripherals
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_LAYER_STATUS=n
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=n
# Disable in-built nice!view widget
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
# Enable custom nice!view widget
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5

View file

@ -0,0 +1,26 @@
/*
* 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>
;
};

View file

@ -0,0 +1,18 @@
if(CONFIG_ZMK_DISPLAY AND CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM AND ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL))
zephyr_library()
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
zephyr_library_sources(custom_status_screen.c)
zephyr_library_sources(widgets/battery_status.c)
zephyr_library_sources(widgets/bongo_cat.c)
zephyr_library_sources(widgets/bongo_cat_images.c)
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE widgets/hid_indicators.c)
zephyr_library_sources(widgets/layer_status.c)
zephyr_library_sources(widgets/modifiers.c)
zephyr_library_sources(widgets/modifiers_sym.c)
zephyr_library_sources(widgets/output_status.c)
zephyr_library_sources(widgets/output_status_sym.c)
endif()

View file

@ -0,0 +1,41 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
if SHIELD_DONGLE_DISPLAY
choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
endchoice
config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
select LV_USE_LABEL
select LV_USE_IMG
select LV_USE_CANVAS
select LV_USE_ANIMIMG
select LV_USE_ANIMATION
select LV_USE_LINE
select LV_FONT_UNSCII_8
select ZMK_WPM
imply ZMK_HID_INDICATORS
choice ZMK_DISPLAY_WORK_QUEUE
default ZMK_DISPLAY_WORK_QUEUE_DEDICATED
endchoice
config LV_Z_MEM_POOL_SIZE
default 8192
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

View file

@ -0,0 +1,5 @@
# Copyright (c) 2024 The ZMK Contributors
# SPDX-License-Identifier: MIT
config SHIELD_DONGLE_DISPLAY
def_bool $(shields_list_contains,dongle_display)

View file

@ -0,0 +1,63 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include "custom_status_screen.h"
#include "widgets/battery_status.h"
#include "widgets/modifiers.h"
#include "widgets/bongo_cat.h"
#include "widgets/layer_status.h"
#include "widgets/output_status.h"
#include "widgets/hid_indicators.h"
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
static struct zmk_widget_output_status output_status_widget;
static struct zmk_widget_layer_status layer_status_widget;
static struct zmk_widget_peripheral_battery_status peripheral_battery_status_widget;
static struct zmk_widget_modifiers modifiers_widget;
static struct zmk_widget_bongo_cat bongo_cat_widget;
#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS)
static struct zmk_widget_hid_indicators hid_indicators_widget;
#endif
lv_style_t global_style;
lv_obj_t *zmk_display_status_screen() {
lv_obj_t *screen;
screen = lv_obj_create(NULL);
lv_style_init(&global_style);
lv_style_set_text_font(&global_style, &lv_font_unscii_8);
lv_style_set_text_letter_space(&global_style, 1);
lv_style_set_text_line_space(&global_style, 1);
lv_obj_add_style(screen, &global_style, LV_PART_MAIN);
zmk_widget_output_status_init(&output_status_widget, screen);
lv_obj_align(zmk_widget_output_status_obj(&output_status_widget), LV_ALIGN_TOP_LEFT, 0, 0);
zmk_widget_bongo_cat_init(&bongo_cat_widget, screen);
lv_obj_align(zmk_widget_bongo_cat_obj(&bongo_cat_widget), LV_ALIGN_BOTTOM_RIGHT, 0, -7);
zmk_widget_modifiers_init(&modifiers_widget, screen);
lv_obj_align(zmk_widget_modifiers_obj(&modifiers_widget), LV_ALIGN_BOTTOM_LEFT, 0, 0);
#if IS_ENABLED(CONFIG_ZMK_HID_INDICATORS)
zmk_widget_hid_indicators_init(&hid_indicators_widget, screen);
lv_obj_align_to(zmk_widget_hid_indicators_obj(&hid_indicators_widget), zmk_widget_modifiers_obj(&modifiers_widget), LV_ALIGN_OUT_TOP_LEFT, 0, -2);
#endif
zmk_widget_layer_status_init(&layer_status_widget, screen);
// lv_obj_align(zmk_widget_layer_status_obj(&layer_status_widget), LV_ALIGN_BOTTOM_LEFT, 2, -18);
lv_obj_align_to(zmk_widget_layer_status_obj(&layer_status_widget), zmk_widget_bongo_cat_obj(&bongo_cat_widget), LV_ALIGN_BOTTOM_LEFT, 0, 5);
zmk_widget_peripheral_battery_status_init(&peripheral_battery_status_widget, screen);
lv_obj_align(zmk_widget_peripheral_battery_status_obj(&peripheral_battery_status_widget), LV_ALIGN_TOP_RIGHT, 0, 0);
return screen;
}

View file

@ -0,0 +1,12 @@
/*
*
* Copyright (c) 2024 The ZMK Contributors
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <lvgl.h>
lv_obj_t *zmk_display_status_screen();

View file

@ -0,0 +1,17 @@
CONFIG_ZMK_DISPLAY=y
CONFIG_BT_BAS=n
CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING=y
# The battery power report interval unit is seconds
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
CONFIG_ZMK_SLEEP=n
# 1800000 milliseconds = 30 minutes * 60 seconds * 1000
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
# number of milliseconds of inactivity before entering idle state
CONFIG_ZMK_IDLE_TIMEOUT=60000
# add keyboard bounce
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# Increase the transmission power of the keyboard ble radio to solve
# the problem of left and right delay and poor communication.
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_ZMK_MOUSE=y

View file

@ -0,0 +1,5 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

View file

@ -0,0 +1,7 @@
file_format: "1"
id: dongle_display
name: dongle_display
type: shield
url: https://github.com/englmaxi/zmk-config
requires:
- i2c_oled

View file

@ -0,0 +1,115 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/display/widgets/battery_status.h>
#include <zmk/usb.h>
#include <zmk/ble.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/events/battery_state_changed.h>
#include "battery_status.h"
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct peripheral_battery_state {
uint8_t source;
uint8_t level;
};
static lv_color_t battery_image_buffer[ZMK_SPLIT_BLE_PERIPHERAL_COUNT][5 * 8];
static void draw_battery(lv_obj_t *canvas, uint8_t level) {
lv_canvas_fill_bg(canvas, lv_color_black(), LV_OPA_COVER);
lv_draw_rect_dsc_t rect_fill_dsc;
lv_draw_rect_dsc_init(&rect_fill_dsc);
rect_fill_dsc.bg_color = lv_color_white();
lv_canvas_set_px(canvas, 0, 0, lv_color_white());
lv_canvas_set_px(canvas, 4, 0, lv_color_white());
if (level > 90) {
// full
} else if (level > 70) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 1, &rect_fill_dsc);
} else if (level > 50) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 2, &rect_fill_dsc);
} else if (level > 30) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 3, &rect_fill_dsc);
} else if (level > 10) {
lv_canvas_draw_rect(canvas, 1, 2, 3, 4, &rect_fill_dsc);
} else {
lv_canvas_draw_rect(canvas, 1, 2, 3, 5, &rect_fill_dsc);
}
}
static void set_battery_symbol(lv_obj_t *widget, struct peripheral_battery_state state) {
lv_obj_t *symbol = lv_obj_get_child(widget, state.source * 2);
lv_obj_t *label = lv_obj_get_child(widget, state.source * 2 + 1);
draw_battery(symbol, state.level);
lv_label_set_text_fmt(label, "%3u%%", state.level);
if (state.level > 0) {
lv_obj_clear_flag(symbol, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(label, LV_OBJ_FLAG_HIDDEN);
} else {
lv_obj_add_flag(symbol, LV_OBJ_FLAG_HIDDEN);
lv_obj_add_flag(label, LV_OBJ_FLAG_HIDDEN);
}
}
void battery_status_update_cb(struct peripheral_battery_state state) {
struct zmk_widget_battery_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_battery_symbol(widget->obj, state); }
}
static struct peripheral_battery_state battery_status_get_state(const zmk_event_t *eh) {
const struct zmk_peripheral_battery_state_changed *ev = as_zmk_peripheral_battery_state_changed(eh);
return (struct peripheral_battery_state){
.source = ev->source,
.level = ev->state_of_charge,
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_battery_status, struct peripheral_battery_state,
battery_status_update_cb, battery_status_get_state)
ZMK_SUBSCRIPTION(widget_battery_status, zmk_peripheral_battery_state_changed);
int zmk_widget_peripheral_battery_status_init(struct zmk_widget_peripheral_battery_status *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
for (int i = 0; i < ZMK_SPLIT_BLE_PERIPHERAL_COUNT; i++) {
lv_obj_t *image_canvas = lv_canvas_create(widget->obj);
lv_obj_t *battery_label = lv_label_create(widget->obj);
lv_canvas_set_buffer(image_canvas, battery_image_buffer[i], 5, 8, LV_IMG_CF_TRUE_COLOR);
lv_obj_align(image_canvas, LV_ALIGN_TOP_RIGHT, 0, i * 10);
lv_obj_align(battery_label, LV_ALIGN_TOP_RIGHT, -7, i * 10);
}
sys_slist_append(&widgets, &widget->node);
widget_battery_status_init();
return 0;
}
lv_obj_t *zmk_widget_peripheral_battery_status_obj(struct zmk_widget_peripheral_battery_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_peripheral_battery_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_peripheral_battery_status_init(struct zmk_widget_peripheral_battery_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_peripheral_battery_status_obj(struct zmk_widget_peripheral_battery_status *widget);

View file

@ -0,0 +1,148 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/wpm_state_changed.h>
#include <zmk/wpm.h>
#include "bongo_cat.h"
#define SRC(array) (const void **)array, sizeof(array) / sizeof(lv_img_dsc_t *)
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
LV_IMG_DECLARE(bongo_cat_none);
LV_IMG_DECLARE(bongo_cat_left1);
LV_IMG_DECLARE(bongo_cat_left2);
LV_IMG_DECLARE(bongo_cat_right1);
LV_IMG_DECLARE(bongo_cat_right2);
LV_IMG_DECLARE(bongo_cat_both1);
LV_IMG_DECLARE(bongo_cat_both1_open);
LV_IMG_DECLARE(bongo_cat_both2);
#define ANIMATION_SPEED_IDLE 10000
const lv_img_dsc_t *idle_imgs[] = {
&bongo_cat_both1_open,
&bongo_cat_both1_open,
&bongo_cat_both1_open,
&bongo_cat_both1,
};
#define ANIMATION_SPEED_SLOW 2000
const lv_img_dsc_t *slow_imgs[] = {
&bongo_cat_left1,
&bongo_cat_both1,
&bongo_cat_both1,
&bongo_cat_right1,
&bongo_cat_both1,
&bongo_cat_both1,
&bongo_cat_left1,
&bongo_cat_both1,
&bongo_cat_both1,
};
#define ANIMATION_SPEED_MID 500
const lv_img_dsc_t *mid_imgs[] = {
&bongo_cat_left2,
&bongo_cat_left1,
&bongo_cat_none,
&bongo_cat_right2,
&bongo_cat_right1,
&bongo_cat_none,
};
#define ANIMATION_SPEED_FAST 200
const lv_img_dsc_t *fast_imgs[] = {
&bongo_cat_both2,
&bongo_cat_both1,
&bongo_cat_none,
&bongo_cat_none,
};
struct bongo_cat_wpm_status_state {
uint8_t wpm;
};
enum anim_state {
anim_state_none,
anim_state_idle,
anim_state_slow,
anim_state_mid,
anim_state_fast
} current_anim_state;
static void set_animation(lv_obj_t *animing, struct bongo_cat_wpm_status_state state) {
if (state.wpm < 5) {
if (current_anim_state != anim_state_idle) {
lv_animimg_set_src(animing, SRC(idle_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_IDLE);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_idle;
}
} else if (state.wpm < 30) {
if (current_anim_state != anim_state_slow) {
lv_animimg_set_src(animing, SRC(slow_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_SLOW);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_slow;
}
} else if (state.wpm < 70) {
if (current_anim_state != anim_state_mid) {
lv_animimg_set_src(animing, SRC(mid_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_MID);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_mid;
}
} else {
if (current_anim_state != anim_state_fast) {
lv_animimg_set_src(animing, SRC(fast_imgs));
lv_animimg_set_duration(animing, ANIMATION_SPEED_FAST);
lv_animimg_set_repeat_count(animing, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animing);
current_anim_state = anim_state_fast;
}
}
}
struct bongo_cat_wpm_status_state bongo_cat_wpm_status_get_state(const zmk_event_t *eh) {
struct zmk_wpm_state_changed *ev = as_zmk_wpm_state_changed(eh);
return (struct bongo_cat_wpm_status_state) { .wpm = ev->state };
};
void bongo_cat_wpm_status_update_cb(struct bongo_cat_wpm_status_state state) {
struct zmk_widget_bongo_cat *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_animation(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_bongo_cat, struct bongo_cat_wpm_status_state,
bongo_cat_wpm_status_update_cb, bongo_cat_wpm_status_get_state)
ZMK_SUBSCRIPTION(widget_bongo_cat, zmk_wpm_state_changed);
int zmk_widget_bongo_cat_init(struct zmk_widget_bongo_cat *widget, lv_obj_t *parent) {
widget->obj = lv_animimg_create(parent);
lv_obj_center(widget->obj);
sys_slist_append(&widgets, &widget->node);
widget_bongo_cat_init();
return 0;
}
lv_obj_t *zmk_widget_bongo_cat_obj(struct zmk_widget_bongo_cat *widget) {
return widget->obj;
}

View file

@ -0,0 +1,19 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
#include <dt-bindings/zmk/modifiers.h>
struct zmk_widget_bongo_cat {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_bongo_cat_init(struct zmk_widget_bongo_cat *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_bongo_cat_obj(struct zmk_widget_bongo_cat *widget);

View file

@ -0,0 +1,383 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_NONE
#define LV_ATTRIBUTE_IMG_BONGO_CAT_NONE
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_NONE uint8_t bongo_cat_none_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x04, 0x10, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_none = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_none_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT1 uint8_t bongo_cat_left1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x10, 0x20, 0x04, 0x10, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_left1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_left1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_LEFT2 uint8_t bongo_cat_left2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x29, 0x82, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x02, 0x41, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x84, 0x21, 0x80, 0x00,
0x00, 0x10, 0x20, 0x04, 0x10, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x84, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7e, 0x00, 0xc0, 0x00,
0x00, 0x66, 0x00, 0x03, 0xf0, 0x40, 0x00,
0x00, 0x40, 0x80, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x04, 0x80, 0x00, 0x00, 0x3e, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_left2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_left2_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT1 uint8_t bongo_cat_right1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_right1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_right1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_RIGHT2 uint8_t bongo_cat_right2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x18, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x24, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x43, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x40, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x40, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x20, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x10, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xfc, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x03, 0xe0, 0x00, 0x00, 0x80, 0x00,
0x00, 0x00, 0x1f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x00, 0x00, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x33, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_right2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_right2_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1 uint8_t bongo_cat_both1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both1_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH1_OPEN uint8_t bongo_cat_both1_open_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x08, 0x00, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x10, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x06, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x00, 0x00, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x00, 0x00, 0x03, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both1_open = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both1_open_map,
};
#ifndef LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2
#define LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_BONGO_CAT_BOTH2 uint8_t bongo_cat_both2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x18, 0x7c, 0x02, 0x00, 0x00,
0x00, 0x00, 0x20, 0x07, 0xc5, 0x00, 0x00,
0x00, 0x00, 0x40, 0x00, 0x79, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x11, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x01, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x02, 0x14, 0x10, 0x02, 0x00, 0x00,
0xe0, 0x04, 0x00, 0x28, 0x02, 0x00, 0x00,
0x1f, 0x08, 0x01, 0x00, 0x01, 0x00, 0x00,
0x00, 0xf0, 0x03, 0x80, 0x01, 0x80, 0x00,
0x00, 0x10, 0x20, 0x00, 0x00, 0x80, 0x00,
0x00, 0x10, 0x7f, 0x82, 0x00, 0x80, 0x00,
0x00, 0x09, 0x80, 0x7c, 0x00, 0xc0, 0x00,
0x00, 0x66, 0x00, 0x08, 0x10, 0x40, 0x00,
0x00, 0x40, 0x80, 0x08, 0x2f, 0xe0, 0x00,
0x00, 0x04, 0x80, 0x04, 0x40, 0x3e, 0x00,
0x00, 0x0c, 0x00, 0x33, 0x80, 0x01, 0xc0,
0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const lv_img_dsc_t bongo_cat_both2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 50,
.header.h = 26,
.data_size = 190,
.data = bongo_cat_both2_map,
};

View file

@ -0,0 +1,81 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/hid_indicators_changed.h>
#include "hid_indicators.h"
#define LED_NLCK 0x01
#define LED_CLCK 0x02
#define LED_SLCK 0x04
struct hid_indicators_state {
uint8_t hid_indicators;
};
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
static void set_hid_indicators(lv_obj_t *label, struct hid_indicators_state state) {
char text[7] = {};
bool lock = false;
if (state.hid_indicators & LED_CLCK) {
strncat(text, "C", 1);
lock = true;
}
if (state.hid_indicators & LED_NLCK) {
strncat(text, "N", 1);
lock = true;
}
if (state.hid_indicators & LED_SLCK) {
strncat(text, "S", 1);
lock = true;
}
if (lock) {
strncat(text, "LCK", 3);
}
lv_label_set_text(label, text);
}
void hid_indicators_update_cb(struct hid_indicators_state state) {
struct zmk_widget_hid_indicators *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_hid_indicators(widget->obj, state); }
}
static struct hid_indicators_state hid_indicators_get_state(const zmk_event_t *eh) {
struct zmk_hid_indicators_changed *ev = as_zmk_hid_indicators_changed(eh);
return (struct hid_indicators_state) {
.hid_indicators = ev->indicators,
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_hid_indicators, struct hid_indicators_state,
hid_indicators_update_cb, hid_indicators_get_state)
ZMK_SUBSCRIPTION(widget_hid_indicators, zmk_hid_indicators_changed);
int zmk_widget_hid_indicators_init(struct zmk_widget_hid_indicators *widget, lv_obj_t *parent) {
widget->obj = lv_label_create(parent);
sys_slist_append(&widgets, &widget->node);
widget_hid_indicators_init();
return 0;
}
lv_obj_t *zmk_widget_hid_indicators_obj(struct zmk_widget_hid_indicators *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_hid_indicators {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_hid_indicators_init(struct zmk_widget_hid_indicators *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_hid_indicators_obj(struct zmk_widget_hid_indicators *widget);

View file

@ -0,0 +1,70 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/display/widgets/layer_status.h>
#include <zmk/events/layer_state_changed.h>
#include <zmk/event_manager.h>
#include <zmk/endpoints.h>
#include <zmk/keymap.h>
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
struct layer_status_state {
uint8_t index;
const char *label;
};
static void set_layer_symbol(lv_obj_t *label, struct layer_status_state state) {
if (state.label == NULL) {
char text[7] = {};
sprintf(text, "%i", state.index);
lv_label_set_text(label, text);
} else {
char text[13] = {};
snprintf(text, sizeof(text), "%s", state.label);
lv_label_set_text(label, text);
}
}
static void layer_status_update_cb(struct layer_status_state state) {
struct zmk_widget_layer_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_layer_symbol(widget->obj, state); }
}
static struct layer_status_state layer_status_get_state(const zmk_event_t *eh) {
uint8_t index = zmk_keymap_highest_layer_active();
return (struct layer_status_state) {
.index = index,
.label = zmk_keymap_layer_name(index)
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_layer_status, struct layer_status_state, layer_status_update_cb,
layer_status_get_state)
ZMK_SUBSCRIPTION(widget_layer_status, zmk_layer_state_changed);
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent) {
widget->obj = lv_label_create(parent);
sys_slist_append(&widgets, &widget->node);
widget_layer_status_init();
return 0;
}
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_layer_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_layer_status_init(struct zmk_widget_layer_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_layer_status_obj(struct zmk_widget_layer_status *widget);

View file

@ -0,0 +1,159 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/services/bas.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/keycode_state_changed.h>
#include <zmk/hid.h>
#include <dt-bindings/zmk/modifiers.h>
#include "modifiers.h"
struct modifiers_state {
uint8_t modifiers;
};
struct modifier_symbol {
uint8_t modifier;
const lv_img_dsc_t *symbol_dsc;
lv_obj_t *symbol;
lv_obj_t *selection_line;
bool is_active;
};
LV_IMG_DECLARE(control_icon);
struct modifier_symbol ms_control = {
.modifier = MOD_LCTL | MOD_RCTL,
.symbol_dsc = &control_icon,
};
LV_IMG_DECLARE(shift_icon);
struct modifier_symbol ms_shift = {
.modifier = MOD_LSFT | MOD_RSFT,
.symbol_dsc = &shift_icon,
};
LV_IMG_DECLARE(alt_icon);
struct modifier_symbol ms_alt = {
.modifier = MOD_LALT | MOD_RALT,
.symbol_dsc = &alt_icon,
};
LV_IMG_DECLARE(win_icon);
struct modifier_symbol ms_gui = {
.modifier = MOD_LGUI | MOD_RGUI,
.symbol_dsc = &win_icon,
};
LV_IMG_DECLARE(opt_icon);
struct modifier_symbol ms_opt = {
.modifier = MOD_LALT | MOD_RALT,
.symbol_dsc = &opt_icon,
};
LV_IMG_DECLARE(cmd_icon);
struct modifier_symbol ms_cmd = {
.modifier = MOD_LGUI | MOD_RGUI,
.symbol_dsc = &cmd_icon,
};
struct modifier_symbol *modifier_symbols[] = {
// this order determines the order of the symbols
&ms_cmd,
&ms_opt,
&ms_control,
&ms_shift
};
#define NUM_SYMBOLS (sizeof(modifier_symbols) / sizeof(struct modifier_symbol *))
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
static void anim_y_cb(void *var, int32_t v) {
lv_obj_set_y(var, v);
}
static void move_object_y(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_y_cb);
lv_anim_set_path_cb(&a, lv_anim_path_overshoot);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void set_modifiers(lv_obj_t *widget, struct modifiers_state state) {
for (int i = 0; i < NUM_SYMBOLS; i++) {
bool mod_is_active = (state.modifiers & modifier_symbols[i]->modifier) > 0;
if (mod_is_active && !modifier_symbols[i]->is_active) {
move_object_y(modifier_symbols[i]->symbol, 1, 0);
move_object_y(modifier_symbols[i]->selection_line, SIZE_SYMBOLS + 4, SIZE_SYMBOLS + 2);
modifier_symbols[i]->is_active = true;
} else if (!mod_is_active && modifier_symbols[i]->is_active) {
move_object_y(modifier_symbols[i]->symbol, 0, 1);
move_object_y(modifier_symbols[i]->selection_line, SIZE_SYMBOLS + 2, SIZE_SYMBOLS + 4);
modifier_symbols[i]->is_active = false;
}
}
}
void modifiers_update_cb(struct modifiers_state state) {
struct zmk_widget_modifiers *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_modifiers(widget->obj, state); }
}
static struct modifiers_state modifiers_get_state(const zmk_event_t *eh) {
return (struct modifiers_state) {
.modifiers = zmk_hid_get_explicit_mods()
};
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_modifiers, struct modifiers_state,
modifiers_update_cb, modifiers_get_state)
ZMK_SUBSCRIPTION(widget_modifiers, zmk_keycode_state_changed);
int zmk_widget_modifiers_init(struct zmk_widget_modifiers *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, NUM_SYMBOLS * (SIZE_SYMBOLS + 1) + 1, SIZE_SYMBOLS + 3);
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 2);
static const lv_point_t selection_line_points[] = { {0, 0}, {SIZE_SYMBOLS, 0} };
for (int i = 0; i < NUM_SYMBOLS; i++) {
modifier_symbols[i]->symbol = lv_img_create(widget->obj);
lv_obj_align(modifier_symbols[i]->symbol, LV_ALIGN_TOP_LEFT, 1 + (SIZE_SYMBOLS + 1) * i, 1);
lv_img_set_src(modifier_symbols[i]->symbol, modifier_symbols[i]->symbol_dsc);
modifier_symbols[i]->selection_line = lv_line_create(widget->obj);
lv_line_set_points(modifier_symbols[i]->selection_line, selection_line_points, 2);
lv_obj_add_style(modifier_symbols[i]->selection_line, &style_line, 0);
lv_obj_align_to(modifier_symbols[i]->selection_line, modifier_symbols[i]->symbol, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 3);
}
sys_slist_append(&widgets, &widget->node);
widget_modifiers_init();
return 0;
}
lv_obj_t *zmk_widget_modifiers_obj(struct zmk_widget_modifiers *widget) {
return widget->obj;
}

View file

@ -0,0 +1,21 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
#include <dt-bindings/zmk/modifiers.h>
#define SIZE_SYMBOLS 14 // 14 x 14 pixel
struct zmk_widget_modifiers {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_modifiers_init(struct zmk_widget_modifiers *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_modifiers_obj(struct zmk_widget_modifiers *widget);

View file

@ -0,0 +1,215 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_CONTROL
#define LV_ATTRIBUTE_IMG_CONTROL
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CONTROL uint8_t control_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x03, 0x00,
0x07, 0x80,
0x0c, 0xc0,
0x18, 0x60,
0x30, 0x30,
0x20, 0x10,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t control_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = control_map,
};
#ifndef LV_ATTRIBUTE_IMG_SHIFT
#define LV_ATTRIBUTE_IMG_SHIFT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SHIFT uint8_t shift_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x03, 0x00,
0x07, 0x80,
0x0c, 0xc0,
0x18, 0x60,
0x30, 0x30,
0x78, 0x78,
0x08, 0x40,
0x08, 0x40,
0x08, 0x40,
0x0f, 0xc0,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t shift_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = shift_map,
};
#ifndef LV_ATTRIBUTE_IMG_ALT
#define LV_ATTRIBUTE_IMG_ALT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_ALT uint8_t alt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x32, 0xf8,
0x4a, 0x20,
0x4a, 0x20,
0x7a, 0x20,
0x4a, 0x20,
0x4b, 0xa0,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t alt_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = alt_map,
};
#ifndef LV_ATTRIBUTE_IMG_GUI
#define LV_ATTRIBUTE_IMG_GUI
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_GUI uint8_t win_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x00, 0xf0,
0x0b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x00, 0x00,
0x3b, 0xf0,
0x3b, 0xf0,
0x3b, 0xf0,
0x03, 0xf0,
0x00, 0x30,
0x00, 0x00,
};
const lv_img_dsc_t win_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = win_map,
};
#ifndef LV_ATTRIBUTE_IMG_CMD
#define LV_ATTRIBUTE_IMG_CMD
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_CMD uint8_t cmd_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x18, 0x60,
0x24, 0x90,
0x24, 0x90,
0x1f, 0xe0,
0x04, 0x80,
0x04, 0x80,
0x1f, 0xe0,
0x24, 0x90,
0x24, 0x90,
0x18, 0x60,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t cmd_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = cmd_map,
};
#ifndef LV_ATTRIBUTE_IMG_OPT
#define LV_ATTRIBUTE_IMG_OPT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_OPT uint8_t opt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x00, 0x00,
0x00, 0x00,
0x3c, 0xe0,
0x3c, 0xe0,
0x06, 0x00,
0x06, 0x00,
0x06, 0x00,
0x03, 0x00,
0x03, 0x00,
0x03, 0x00,
0x01, 0xe0,
0x01, 0xe0,
0x00, 0x00,
0x00, 0x00,
};
const lv_img_dsc_t opt_icon = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 14,
.header.h = 14,
.data_size = 36,
.data = opt_map,
};

View file

@ -0,0 +1,207 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#include <zmk/display.h>
#include <zmk/event_manager.h>
#include <zmk/events/ble_active_profile_changed.h>
#include <zmk/events/endpoint_changed.h>
#include <zmk/events/usb_conn_state_changed.h>
#include <zmk/usb.h>
#include <zmk/ble.h>
#include <zmk/endpoints.h>
#include "output_status.h"
static sys_slist_t widgets = SYS_SLIST_STATIC_INIT(&widgets);
LV_IMG_DECLARE(sym_usb);
LV_IMG_DECLARE(sym_bt);
LV_IMG_DECLARE(sym_ok);
LV_IMG_DECLARE(sym_nok);
LV_IMG_DECLARE(sym_open);
LV_IMG_DECLARE(sym_1);
LV_IMG_DECLARE(sym_2);
LV_IMG_DECLARE(sym_3);
LV_IMG_DECLARE(sym_4);
LV_IMG_DECLARE(sym_5);
const lv_img_dsc_t *sym_num[] = {
&sym_1,
&sym_2,
&sym_3,
&sym_4,
&sym_5,
};
enum output_symbol {
output_symbol_usb,
output_symbol_usb_hid_status,
output_symbol_bt,
output_symbol_bt_number,
output_symbol_bt_status,
output_symbol_selection_line
};
enum selection_line_state {
selection_line_state_usb,
selection_line_state_bt
} current_selection_line_state;
lv_point_t selection_line_points[] = { {-1, 0}, {12, 0} }; // will be replaced with lv_point_precise_t
struct output_status_state {
struct zmk_endpoint_instance selected_endpoint;
int active_profile_index;
bool active_profile_connected;
bool active_profile_bonded;
bool usb_is_hid_ready;
};
static struct output_status_state get_state(const zmk_event_t *_eh) {
return (struct output_status_state){
.selected_endpoint = zmk_endpoints_selected(),
.active_profile_index = zmk_ble_active_profile_index(),
.active_profile_connected = zmk_ble_active_profile_is_connected(),
.active_profile_bonded = !zmk_ble_active_profile_is_open(),
.usb_is_hid_ready = zmk_usb_is_hid_ready()
};
}
static void anim_x_cb(void * var, int32_t v) {
lv_obj_set_x(var, v);
}
static void anim_size_cb(void * var, int32_t v) {
selection_line_points[1].x = v;
}
static void move_object_x(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_x_cb);
lv_anim_set_path_cb(&a, lv_anim_path_overshoot);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void change_size_object(void *obj, int32_t from, int32_t to) {
lv_anim_t a;
lv_anim_init(&a);
lv_anim_set_var(&a, obj);
lv_anim_set_time(&a, 200); // will be replaced with lv_anim_set_duration
lv_anim_set_exec_cb(&a, anim_size_cb);
lv_anim_set_path_cb(&a, lv_anim_path_ease_in_out);
lv_anim_set_values(&a, from, to);
lv_anim_start(&a);
}
static void set_status_symbol(lv_obj_t *widget, struct output_status_state state) {
lv_obj_t *usb = lv_obj_get_child(widget, output_symbol_usb);
lv_obj_t *usb_hid_status = lv_obj_get_child(widget, output_symbol_usb_hid_status);
lv_obj_t *bt = lv_obj_get_child(widget, output_symbol_bt);
lv_obj_t *bt_number = lv_obj_get_child(widget, output_symbol_bt_number);
lv_obj_t *bt_status = lv_obj_get_child(widget, output_symbol_bt_status);
lv_obj_t *selection_line = lv_obj_get_child(widget, output_symbol_selection_line);
switch (state.selected_endpoint.transport) {
case ZMK_TRANSPORT_USB:
if (current_selection_line_state != selection_line_state_usb) {
move_object_x(selection_line, lv_obj_get_x(bt) - 1, lv_obj_get_x(usb) - 1);
change_size_object(selection_line, 18, 11);
current_selection_line_state = selection_line_state_usb;
}
break;
case ZMK_TRANSPORT_BLE:
if (current_selection_line_state != selection_line_state_bt) {
move_object_x(selection_line, lv_obj_get_x(usb) - 1, lv_obj_get_x(bt) - 1);
change_size_object(selection_line, 11, 18);
current_selection_line_state = selection_line_state_bt;
}
break;
}
if (state.usb_is_hid_ready) {
lv_img_set_src(usb_hid_status, &sym_ok);
} else {
lv_img_set_src(usb_hid_status, &sym_nok);
}
if (state.active_profile_index < (sizeof(sym_num) / sizeof(lv_img_dsc_t *))) {
lv_img_set_src(bt_number, sym_num[state.active_profile_index]);
} else {
lv_img_set_src(bt_number, &sym_nok);
}
if (state.active_profile_bonded) {
if (state.active_profile_connected) {
lv_img_set_src(bt_status, &sym_ok);
} else {
lv_img_set_src(bt_status, &sym_nok);
}
} else {
lv_img_set_src(bt_status, &sym_open);
}
}
static void output_status_update_cb(struct output_status_state state) {
struct zmk_widget_output_status *widget;
SYS_SLIST_FOR_EACH_CONTAINER(&widgets, widget, node) { set_status_symbol(widget->obj, state); }
}
ZMK_DISPLAY_WIDGET_LISTENER(widget_output_status, struct output_status_state,
output_status_update_cb, get_state)
ZMK_SUBSCRIPTION(widget_output_status, zmk_endpoint_changed);
ZMK_SUBSCRIPTION(widget_output_status, zmk_ble_active_profile_changed);
ZMK_SUBSCRIPTION(widget_output_status, zmk_usb_conn_state_changed);
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent) {
widget->obj = lv_obj_create(parent);
lv_obj_set_size(widget->obj, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_t *usb = lv_img_create(widget->obj);
lv_obj_align(usb, LV_ALIGN_TOP_LEFT, 1, 4);
lv_img_set_src(usb, &sym_usb);
lv_obj_t *usb_hid_status = lv_img_create(widget->obj);
lv_obj_align_to(usb_hid_status, usb, LV_ALIGN_BOTTOM_LEFT, 2, -7);
lv_obj_t *bt = lv_img_create(widget->obj);
lv_obj_align_to(bt, usb, LV_ALIGN_OUT_RIGHT_TOP, 6, 0);
lv_img_set_src(bt, &sym_bt);
lv_obj_t *bt_number = lv_img_create(widget->obj);
lv_obj_align_to(bt_number, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 7);
lv_obj_t *bt_status = lv_img_create(widget->obj);
lv_obj_align_to(bt_status, bt, LV_ALIGN_OUT_RIGHT_TOP, 2, 1);
static lv_style_t style_line;
lv_style_init(&style_line);
lv_style_set_line_width(&style_line, 2);
lv_obj_t *selection_line;
selection_line = lv_line_create(widget->obj);
lv_line_set_points(selection_line, selection_line_points, 2);
lv_obj_add_style(selection_line, &style_line, 0);
lv_obj_align_to(selection_line, usb, LV_ALIGN_OUT_TOP_LEFT, 3, -1);
sys_slist_append(&widgets, &widget->node);
widget_output_status_init();
return 0;
}
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget) {
return widget->obj;
}

View file

@ -0,0 +1,18 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#pragma once
#include <lvgl.h>
#include <zephyr/kernel.h>
struct zmk_widget_output_status {
sys_snode_t node;
lv_obj_t *obj;
};
int zmk_widget_output_status_init(struct zmk_widget_output_status *widget, lv_obj_t *parent);
lv_obj_t *zmk_widget_output_status_obj(struct zmk_widget_output_status *widget);

View file

@ -0,0 +1,231 @@
/*
* Copyright (c) 2024 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <lvgl.h>
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
#ifndef LV_ATTRIBUTE_IMG_SYM_1
#define LV_ATTRIBUTE_IMG_SYM_1
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_1 uint8_t sym_1_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x30, 0x70, 0x70, 0x30, 0x30, 0x30,
};
const lv_img_dsc_t sym_1 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_1_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_2
#define LV_ATTRIBUTE_IMG_SYM_2
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_2 uint8_t sym_2_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x70, 0xd8, 0x18, 0x30, 0x60, 0xf8,
};
const lv_img_dsc_t sym_2 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_2_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_3
#define LV_ATTRIBUTE_IMG_SYM_3
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_3 uint8_t sym_3_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x70, 0x98, 0x30, 0x18, 0xd8, 0x70,
};
const lv_img_dsc_t sym_3 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_3_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_4
#define LV_ATTRIBUTE_IMG_SYM_4
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_4 uint8_t sym_4_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x10, 0x30, 0x70, 0xd0, 0xf8, 0x10,
};
const lv_img_dsc_t sym_4 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_4_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_5
#define LV_ATTRIBUTE_IMG_SYM_5
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_5 uint8_t sym_5_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x78, 0x40, 0x70, 0x18, 0xd8, 0x70,
};
const lv_img_dsc_t sym_5 = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 6,
.data_size = 14,
.data = sym_5_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_OK
#define LV_ATTRIBUTE_IMG_SYM_OK
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_OK uint8_t sym_ok_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x08, 0x18, 0xb0, 0xe0, 0x40,
};
const lv_img_dsc_t sym_ok = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_ok_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_NOK
#define LV_ATTRIBUTE_IMG_SYM_NOK
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_NOK uint8_t sym_nok_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x88, 0xd8, 0x70, 0xd8, 0x88,
};
const lv_img_dsc_t sym_nok = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_nok_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_OPEN
#define LV_ATTRIBUTE_IMG_SYM_OPEN
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_OPEN uint8_t sym_open_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x20, 0x70, 0xd8, 0x70, 0x20,
};
const lv_img_dsc_t sym_open = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 5,
.header.h = 5,
.data_size = 13,
.data = sym_open_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_BT
#define LV_ATTRIBUTE_IMG_SYM_BT
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_BT uint8_t sym_bt_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x3e, 0x00, 0x67, 0x00, 0xe3, 0x80, 0xe9,
0x80, 0x8c, 0x80, 0xc9, 0x80, 0xe3, 0x80,
0xe3, 0x80, 0xc9, 0x80, 0x8c, 0x80, 0xe9,
0x80, 0xe3, 0x80, 0x67, 0x00, 0x3e, 0x00,
};
const lv_img_dsc_t sym_bt = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 9,
.header.h = 14,
.data_size = 36,
.data = sym_bt_map,
};
#ifndef LV_ATTRIBUTE_IMG_SYM_USB
#define LV_ATTRIBUTE_IMG_SYM_USB
#endif
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SYM_USB uint8_t sym_usb_map[] = {
0xff, 0xff, 0xff, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0xff, /*Color of index 1*/
0x7f, 0x00, 0x41, 0x00, 0x55, 0x00, 0x41,
0x00, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
0x80, 0x80, 0x80, 0x80, 0x80, 0xff, 0x80,
};
const lv_img_dsc_t sym_usb = {
.header.cf = LV_IMG_CF_INDEXED_1BIT,
.header.always_zero = 0,
.header.reserved = 0,
.header.w = 9,
.header.h = 14,
.data_size = 36,
.data = sym_usb_map,
};

View file

@ -1,707 +0,0 @@
CONFIG_ADC=y
CONFIG_ADC_CONFIGURABLE_INPUTS=y
CONFIG_ADC_INIT_PRIORITY=50
CONFIG_ADC_NRFX_SAADC=y
CONFIG_APPLICATION_INIT_PRIORITY=90
CONFIG_APP_LINK_WITH_LVGL=y
CONFIG_ARCH="arm"
CONFIG_ARCH_HAS_CODE_DATA_RELOCATION=y
CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT=y
CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN=y
CONFIG_ARCH_HAS_EXECUTABLE_PAGE_BIT=y
CONFIG_ARCH_HAS_EXTRA_EXCEPTION_INFO=y
CONFIG_ARCH_HAS_NESTED_EXCEPTION_DETECTION=y
CONFIG_ARCH_HAS_RAMFUNC_SUPPORT=y
CONFIG_ARCH_HAS_SINGLE_THREAD_SUPPORT=y
CONFIG_ARCH_HAS_STACK_PROTECTION=y
CONFIG_ARCH_HAS_SUSPEND_TO_RAM=y
CONFIG_ARCH_HAS_THREAD_ABORT=y
CONFIG_ARCH_HAS_THREAD_LOCAL_STORAGE=y
CONFIG_ARCH_HAS_TIMING_FUNCTIONS=y
CONFIG_ARCH_HAS_USERSPACE=y
CONFIG_ARCH_IRQ_VECTOR_TABLE_ALIGN=4
CONFIG_ARCH_IS_SET=y
CONFIG_ARCH_SUPPORTS_ARCH_HW_INIT=y
CONFIG_ARCH_SUPPORTS_COREDUMP=y
CONFIG_ARCH_SW_ISR_TABLE_ALIGN=4
CONFIG_ARM=y
CONFIG_ARMV7_M_ARMV8_M_FP=y
CONFIG_ARMV7_M_ARMV8_M_MAINLINE=y
CONFIG_ARM_MPU=y
CONFIG_ARM_MPU_REGION_MIN_ALIGN_AND_SIZE=32
CONFIG_ASSEMBLER_ISA_THUMB2=y
CONFIG_ASSERT_VERBOSE=y
CONFIG_ATOMIC_OPERATIONS_BUILTIN=y
CONFIG_BOARD="nice_nano"
CONFIG_BOARD_ENABLE_DCDC=y
CONFIG_BOARD_NICE_NANO_V2=y
CONFIG_BOARD_REVISION=""
CONFIG_BOOT_BANNER=y
CONFIG_BOOT_DELAY=0
CONFIG_BT=y
CONFIG_BT_ASSERT=y
CONFIG_BT_ASSERT_VERBOSE=y
CONFIG_BT_ATT_ENFORCE_FLOW=y
CONFIG_BT_ATT_PREPARE_COUNT=0
CONFIG_BT_ATT_RETRY_ON_SEC_ERR=y
CONFIG_BT_AUTO_DATA_LEN_UPDATE=y
CONFIG_BT_AUTO_PHY_UPDATE=y
CONFIG_BT_BACKGROUND_SCAN_INTERVAL=2048
CONFIG_BT_BACKGROUND_SCAN_WINDOW=18
CONFIG_BT_BAS=y
CONFIG_BT_BONDABLE=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_BUF_ACL_RX_COUNT=3
CONFIG_BT_BUF_ACL_RX_SIZE=69
CONFIG_BT_BUF_ACL_TX_COUNT=3
CONFIG_BT_BUF_ACL_TX_SIZE=27
CONFIG_BT_BUF_CMD_TX_COUNT=2
CONFIG_BT_BUF_CMD_TX_SIZE=65
CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=3
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
CONFIG_BT_BUF_EVT_RX_COUNT=3
CONFIG_BT_BUF_EVT_RX_SIZE=68
CONFIG_BT_CENTRAL=y
CONFIG_BT_COMPANY_ID=0x05F1
CONFIG_BT_CONN=y
CONFIG_BT_CONN_PARAM_UPDATE_TIMEOUT=5000
CONFIG_BT_CONN_TX=y
CONFIG_BT_CONN_TX_MAX=3
CONFIG_BT_CREATE_CONN_TIMEOUT=3
CONFIG_BT_CTLR=y
CONFIG_BT_CTLR_ADV_DATA_BUF_MAX=1
CONFIG_BT_CTLR_ADV_EXT_SUPPORT=y
CONFIG_BT_CTLR_ADV_ISO_SUPPORT=y
CONFIG_BT_CTLR_ADV_PERIODIC_SUPPORT=y
CONFIG_BT_CTLR_AD_DATA_BACKUP=y
CONFIG_BT_CTLR_CHAN_SEL_2=y
CONFIG_BT_CTLR_CHAN_SEL_2_SUPPORT=y
CONFIG_BT_CTLR_CHECK_SAME_PEER_CONN=y
CONFIG_BT_CTLR_COMPANY_ID=0x05F1
CONFIG_BT_CTLR_CONN_PARAM_REQ=y
CONFIG_BT_CTLR_CONN_PARAM_REQ_SUPPORT=y
CONFIG_BT_CTLR_CONN_RANDOM_FORCE=y
CONFIG_BT_CTLR_CONN_RSSI_SUPPORT=y
CONFIG_BT_CTLR_CRYPTO=y
CONFIG_BT_CTLR_DATA_LENGTH=y
CONFIG_BT_CTLR_DATA_LENGTH_MAX=27
CONFIG_BT_CTLR_DATA_LEN_UPDATE_SUPPORT=y
CONFIG_BT_CTLR_DTM_HCI_SUPPORT=y
CONFIG_BT_CTLR_DUP_FILTER_LEN=16
CONFIG_BT_CTLR_EXT_REJ_IND=y
CONFIG_BT_CTLR_EXT_REJ_IND_SUPPORT=y
CONFIG_BT_CTLR_EXT_SCAN_FP=y
CONFIG_BT_CTLR_EXT_SCAN_FP_SUPPORT=y
CONFIG_BT_CTLR_FORCE_MD_COUNT=0
CONFIG_BT_CTLR_HCI_VS_BUILD_INFO=""
CONFIG_BT_CTLR_LE_ENC=y
CONFIG_BT_CTLR_LE_ENC_SUPPORT=y
CONFIG_BT_CTLR_LE_PING=y
CONFIG_BT_CTLR_LLCP_CONN=6
CONFIG_BT_CTLR_LLL_PRIO=0
CONFIG_BT_CTLR_MIN_USED_CHAN=y
CONFIG_BT_CTLR_MIN_USED_CHAN_SUPPORT=y
CONFIG_BT_CTLR_OPTIMIZE_FOR_SPEED=y
CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG=y
CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG_SUPPORT=y
CONFIG_BT_CTLR_PHY=y
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_PHY_2M_SUPPORT=y
CONFIG_BT_CTLR_PHY_CODED_SUPPORT=y
CONFIG_BT_CTLR_PHY_UPDATE_SUPPORT=y
CONFIG_BT_CTLR_PRIVACY_SUPPORT=y
CONFIG_BT_CTLR_RADIO_ENABLE_FAST=y
CONFIG_BT_CTLR_RX_BUFFERS=1
CONFIG_BT_CTLR_RX_PRIO_STACK_SIZE=448
CONFIG_BT_CTLR_SCHED_ADVANCED=y
CONFIG_BT_CTLR_SCHED_ADVANCED_CENTRAL_CONN_SPACING=0
CONFIG_BT_CTLR_SCHED_ADVANCED_SUPPORT=y
CONFIG_BT_CTLR_SUBVERSION_NUMBER=0xFFFF
CONFIG_BT_CTLR_SYNC_ISO_SUPPORT=y
CONFIG_BT_CTLR_SYNC_PERIODIC_SUPPORT=y
CONFIG_BT_CTLR_TIFS_HW_SUPPORT=y
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
CONFIG_BT_CTLR_ULL_HIGH_PRIO=1
CONFIG_BT_CTLR_ULL_LLL_PRIO_SUPPORT=y
CONFIG_BT_CTLR_ULL_LOW_PRIO=1
CONFIG_BT_CTLR_XTAL_ADVANCED=y
CONFIG_BT_CTLR_XTAL_ADVANCED_SUPPORT=y
CONFIG_BT_CTLR_XTAL_THRESHOLD=1500
CONFIG_BT_DATA_LEN_UPDATE=y
CONFIG_BT_DEBUG_NONE=y
CONFIG_BT_DEVICE_APPEARANCE=961
CONFIG_BT_DEVICE_NAME="Korne"
CONFIG_BT_DIS=y
CONFIG_BT_DIS_MANUF="ZMK Project"
CONFIG_BT_DIS_MODEL="Korne"
CONFIG_BT_DIS_PNP=y
CONFIG_BT_DIS_PNP_PID=0x615E
CONFIG_BT_DIS_PNP_VER=1
CONFIG_BT_DIS_PNP_VID=0x1D50
CONFIG_BT_DIS_PNP_VID_SRC=1
CONFIG_BT_DRIVER_RX_HIGH_PRIO=6
CONFIG_BT_ECC=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=y
CONFIG_BT_GATT_AUTO_DISCOVER_CCC=y
CONFIG_BT_GATT_CACHING=y
CONFIG_BT_GATT_CLIENT=y
CONFIG_BT_GATT_READ_MULTIPLE=y
CONFIG_BT_GATT_READ_MULT_VAR_LEN=y
CONFIG_BT_GATT_SERVICE_CHANGED=y
CONFIG_BT_HAS_HCI_VS=y
CONFIG_BT_HCI=y
CONFIG_BT_HCI_HOST=y
CONFIG_BT_HCI_RESERVE=0
CONFIG_BT_HCI_TX_PRIO=7
CONFIG_BT_HCI_TX_STACK_SIZE=1024
CONFIG_BT_HCI_VS=y
CONFIG_BT_HCI_VS_EXT=y
CONFIG_BT_ID_MAX=1
CONFIG_BT_L2CAP_TX_BUF_COUNT=3
CONFIG_BT_L2CAP_TX_FRAG_COUNT=2
CONFIG_BT_L2CAP_TX_MTU=65
CONFIG_BT_LIM_ADV_TIMEOUT=30
CONFIG_BT_LLL_VENDOR_NORDIC=y
CONFIG_BT_LL_SW_LLCP_LEGACY=y
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_LONG_WQ=y
CONFIG_BT_LONG_WQ_PRIO=10
CONFIG_BT_LONG_WQ_STACK_SIZE=1300
CONFIG_BT_MAX_CONN=6
CONFIG_BT_MAX_PAIRED=6
CONFIG_BT_MAYFLY_YIELD_AFTER_CALL=y
CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_PERIPHERAL_PREF_LATENCY=30
CONFIG_BT_PERIPHERAL_PREF_MAX_INT=12
CONFIG_BT_PERIPHERAL_PREF_MIN_INT=6
CONFIG_BT_PERIPHERAL_PREF_TIMEOUT=400
CONFIG_BT_PHY_UPDATE=y
CONFIG_BT_RECV_BLOCKING=y
CONFIG_BT_RPA=y
CONFIG_BT_RX_PRIO=8
CONFIG_BT_RX_STACK_SIZE=2200
CONFIG_BT_SETTINGS=y
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=y
CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y
CONFIG_BT_SETTINGS_USE_PRINTK=y
CONFIG_BT_SMP=y
CONFIG_BT_SMP_APP_PAIRING_ACCEPT=y
CONFIG_BT_SMP_ENFORCE_MITM=y
CONFIG_BT_SMP_MIN_ENC_KEY_SIZE=7
CONFIG_BT_SMP_SC_PAIR_ONLY=y
CONFIG_BT_TICKER_EXT=y
CONFIG_BT_TINYCRYPT_ECC=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BUILD_OUTPUT_BIN=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_BUILD_OUTPUT_UF2=y
CONFIG_BUILD_OUTPUT_UF2_FAMILY_ID="0xada52840"
CONFIG_CBPRINTF_FULL_INTEGRAL=y
CONFIG_CBPRINTF_LIBC_SUBSTS=y
CONFIG_CBPRINTF_NANO=y
CONFIG_CLOCK_CONTROL=y
CONFIG_CLOCK_CONTROL_INIT_PRIORITY=30
CONFIG_CLOCK_CONTROL_NRF=y
CONFIG_CLOCK_CONTROL_NRF_ACCURACY=50
CONFIG_CLOCK_CONTROL_NRF_K32SRC_50PPM=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
CONFIG_COMPAT_INCLUDES=y
CONFIG_COMPILER_COLOR_DIAGNOSTICS=y
CONFIG_COMPILER_ISA_THUMB2=y
CONFIG_COMPILER_OPT=""
CONFIG_COOP_ENABLED=y
CONFIG_CPU_CORTEX=y
CONFIG_CPU_CORTEX_M4=y
CONFIG_CPU_CORTEX_M=y
CONFIG_CPU_CORTEX_M_HAS_BASEPRI=y
CONFIG_CPU_CORTEX_M_HAS_DWT=y
CONFIG_CPU_CORTEX_M_HAS_PROGRAMMABLE_FAULT_PRIOS=y
CONFIG_CPU_CORTEX_M_HAS_SYSTICK=y
CONFIG_CPU_CORTEX_M_HAS_VTOR=y
CONFIG_CPU_HAS_ARM_MPU=y
CONFIG_CPU_HAS_FPU=y
CONFIG_CPU_HAS_MPU=y
CONFIG_CSPRING_ENABLED=y
CONFIG_CUSTOM_SECTION_MIN_ALIGN_SIZE=32
CONFIG_DCACHE_LINE_SIZE=32
CONFIG_DEPRECATED=y
CONFIG_DISPLAY=y
CONFIG_DISPLAY_INIT_PRIORITY=85
CONFIG_DT_HAS_ARM_ARMV7M_ITM_ENABLED=y
CONFIG_DT_HAS_ARM_CORTEX_M4F_ENABLED=y
CONFIG_DT_HAS_ARM_CRYPTOCELL_310_ENABLED=y
CONFIG_DT_HAS_ARM_V7M_NVIC_ENABLED=y
CONFIG_DT_HAS_FIXED_PARTITIONS_ENABLED=y
CONFIG_DT_HAS_GPIO_LEDS_ENABLED=y
CONFIG_DT_HAS_MMIO_SRAM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF52_FLASH_CONTROLLER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_ACL_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CC310_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CCM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_CLOCK_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_ECB_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_EGU_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_FICR_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_GPIOTE_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_GPIO_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_MWU_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_PINCTRL_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_POWER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_PPI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RADIO_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RNG_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_RTC_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SAADC_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SPIM_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_SWI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TEMP_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TIMER_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_TWI_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_UICR_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_USBD_ENABLED=y
CONFIG_DT_HAS_NORDIC_NRF_WDT_ENABLED=y
CONFIG_DT_HAS_POWER_DOMAIN_ENABLED=y
CONFIG_DT_HAS_POWER_DOMAIN_GPIO_ENABLED=y
CONFIG_DT_HAS_SOC_NV_FLASH_ENABLED=y
CONFIG_DT_HAS_SOLOMON_SSD1306FB_ENABLED=y
CONFIG_DT_HAS_WORLDSEMI_WS2812_SPI_ENABLED=y
CONFIG_DT_HAS_ZEPHYR_BT_HCI_ENTROPY_ENABLED=y
CONFIG_DT_HAS_ZEPHYR_CDC_ACM_UART_ENABLED=y
CONFIG_DT_HAS_ZMK_BATTERY_NRF_VDDH_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_BLUETOOTH_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_EXT_POWER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_HOLD_TAP_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_KEY_PRESS_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_MOMENTARY_LAYER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_NONE_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_RESET_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_RGB_UNDERGLOW_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_TOGGLE_LAYER_ENABLED=y
CONFIG_DT_HAS_ZMK_BEHAVIOR_TRANSPARENT_ENABLED=y
CONFIG_DT_HAS_ZMK_COMBOS_ENABLED=y
CONFIG_DT_HAS_ZMK_CONDITIONAL_LAYERS_ENABLED=y
CONFIG_DT_HAS_ZMK_KEYMAP_ENABLED=y
CONFIG_DT_HAS_ZMK_KSCAN_GPIO_MATRIX_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_PRESS_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_RELEASE_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_MODE_TAP_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_TAP_TIME_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_CONTROL_WAIT_TIME_ENABLED=y
CONFIG_DT_HAS_ZMK_MACRO_PAUSE_FOR_RELEASE_ENABLED=y
CONFIG_DT_HAS_ZMK_MATRIX_TRANSFORM_ENABLED=y
CONFIG_EARLY_CONSOLE=y
CONFIG_ENFORCE_ZEPHYR_STDINT=y
CONFIG_ENTROPY_BT_HCI=y
CONFIG_ENTROPY_GENERATOR=y
CONFIG_ENTROPY_HAS_DRIVER=y
CONFIG_ENTROPY_INIT_PRIORITY=50
CONFIG_ENTROPY_NRF5_BIAS_CORRECTION=y
CONFIG_ENTROPY_NRF5_ISR_POOL_SIZE=16
CONFIG_ENTROPY_NRF5_ISR_THRESHOLD=12
CONFIG_ENTROPY_NRF5_RNG=y
CONFIG_ENTROPY_NRF5_THR_POOL_SIZE=8
CONFIG_ENTROPY_NRF5_THR_THRESHOLD=4
CONFIG_ERRNO=y
CONFIG_ETH_INIT_PRIORITY=80
CONFIG_FAULT_DUMP=2
CONFIG_FLASH=y
CONFIG_FLASH_BASE_ADDRESS=0x0
CONFIG_FLASH_HAS_DRIVER_ENABLED=y
CONFIG_FLASH_HAS_PAGE_LAYOUT=y
CONFIG_FLASH_INIT_PRIORITY=50
CONFIG_FLASH_LOAD_OFFSET=0x26000
CONFIG_FLASH_LOAD_SIZE=0xc6000
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_SIZE=1024
CONFIG_FP16=y
CONFIG_FP16_IEEE=y
CONFIG_GEN_IRQ_START_VECTOR=0
CONFIG_GEN_IRQ_VECTOR_TABLE=y
CONFIG_GEN_ISR_TABLES=y
CONFIG_GEN_PRIV_STACKS=y
CONFIG_GEN_SW_ISR_TABLE=y
CONFIG_GPIO=y
CONFIG_GPIO_AS_PINRESET=y
CONFIG_GPIO_INIT_PRIORITY=40
CONFIG_GPIO_NRFX=y
CONFIG_HARDWARE_DEVICE_CS_GENERATOR=y
CONFIG_HAS_CMSIS_CORE=y
CONFIG_HAS_CMSIS_CORE_M=y
CONFIG_HAS_DTS=y
CONFIG_HAS_DYNAMIC_DEVICE_HANDLES=y
CONFIG_HAS_FLASH_LOAD_OFFSET=y
CONFIG_HAS_HW_NRF_ACL=y
CONFIG_HAS_HW_NRF_CC310=y
CONFIG_HAS_HW_NRF_CCM=y
CONFIG_HAS_HW_NRF_CCM_LFLEN_8BIT=y
CONFIG_HAS_HW_NRF_CLOCK=y
CONFIG_HAS_HW_NRF_ECB=y
CONFIG_HAS_HW_NRF_EGU0=y
CONFIG_HAS_HW_NRF_EGU1=y
CONFIG_HAS_HW_NRF_EGU2=y
CONFIG_HAS_HW_NRF_EGU3=y
CONFIG_HAS_HW_NRF_EGU4=y
CONFIG_HAS_HW_NRF_EGU5=y
CONFIG_HAS_HW_NRF_GPIO0=y
CONFIG_HAS_HW_NRF_GPIO1=y
CONFIG_HAS_HW_NRF_GPIOTE=y
CONFIG_HAS_HW_NRF_MWU=y
CONFIG_HAS_HW_NRF_NVMC_PE=y
CONFIG_HAS_HW_NRF_POWER=y
CONFIG_HAS_HW_NRF_PPI=y
CONFIG_HAS_HW_NRF_RADIO_BLE_2M=y
CONFIG_HAS_HW_NRF_RADIO_BLE_CODED=y
CONFIG_HAS_HW_NRF_RADIO_IEEE802154=y
CONFIG_HAS_HW_NRF_RADIO_TX_PWR_HIGH=y
CONFIG_HAS_HW_NRF_RNG=y
CONFIG_HAS_HW_NRF_RTC0=y
CONFIG_HAS_HW_NRF_RTC1=y
CONFIG_HAS_HW_NRF_RTC2=y
CONFIG_HAS_HW_NRF_SAADC=y
CONFIG_HAS_HW_NRF_SPIM3=y
CONFIG_HAS_HW_NRF_SWI0=y
CONFIG_HAS_HW_NRF_SWI1=y
CONFIG_HAS_HW_NRF_SWI2=y
CONFIG_HAS_HW_NRF_SWI3=y
CONFIG_HAS_HW_NRF_SWI4=y
CONFIG_HAS_HW_NRF_SWI5=y
CONFIG_HAS_HW_NRF_TEMP=y
CONFIG_HAS_HW_NRF_TIMER0=y
CONFIG_HAS_HW_NRF_TIMER1=y
CONFIG_HAS_HW_NRF_TIMER2=y
CONFIG_HAS_HW_NRF_TIMER3=y
CONFIG_HAS_HW_NRF_TIMER4=y
CONFIG_HAS_HW_NRF_TWI0=y
CONFIG_HAS_HW_NRF_USBD=y
CONFIG_HAS_HW_NRF_WDT0=y
CONFIG_HAS_NEWLIB_LIBC_NANO=y
CONFIG_HAS_NORDIC_DRIVERS=y
CONFIG_HAS_NRFX=y
CONFIG_HAS_SEGGER_RTT=y
CONFIG_HAS_SWO=y
CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_HID_INTERRUPT_EP_MPS=16
CONFIG_HWINFO=y
CONFIG_HWINFO_NRF=y
CONFIG_I2C=y
CONFIG_I2C_0_NRF_TWI=y
CONFIG_I2C_INIT_PRIORITY=50
CONFIG_I2C_NRFX=y
CONFIG_ICACHE_LINE_SIZE=32
CONFIG_IDLE_STACK_SIZE=320
CONFIG_INTC_INIT_PRIORITY=40
CONFIG_IRQ_VECTOR_TABLE_JUMP_BY_ADDRESS=y
CONFIG_ISA_THUMB2=y
CONFIG_ISR_STACK_SIZE=2048
CONFIG_KERNEL_BIN_NAME="zmk"
CONFIG_KERNEL_ENTRY="__start"
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT=40
CONFIG_KERNEL_INIT_PRIORITY_DEVICE=50
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS=30
CONFIG_KERNEL_MEM_POOL=y
CONFIG_KOBJECT_DATA_AREA_RESERVE_EXTRA_PERCENT=100
CONFIG_KOBJECT_RODATA_AREA_EXTRA_BYTES=16
CONFIG_KOBJECT_TEXT_AREA=256
CONFIG_LD_LINKER_SCRIPT_SUPPORTED=y
CONFIG_LD_LINKER_TEMPLATE=y
CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT=y
CONFIG_LINKER_ORPHAN_SECTION_WARN=y
CONFIG_LINKER_SORT_BY_ALIGNMENT=y
CONFIG_LVGL=y
CONFIG_LV_ASSERT_HANDLER_INCLUDE="assert.h"
CONFIG_LV_ATTRIBUTE_MEM_ALIGN_SIZE=1
CONFIG_LV_CIRCLE_CACHE_SIZE=4
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
CONFIG_LV_COLOR_DEPTH=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_COLOR_MIX_ROUND_OFS=128
CONFIG_LV_CONF_MINIMAL=y
CONFIG_LV_DISP_DEF_REFR_PERIOD=30
CONFIG_LV_DISP_ROT_MAX_BUF=10240
CONFIG_LV_DPI_DEF=130
CONFIG_LV_DRAW_COMPLEX=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_12=y
CONFIG_LV_FONT_MONTSERRAT_16=y
CONFIG_LV_FONT_UNSCII_8=y
CONFIG_LV_GRADIENT_MAX_STOPS=2
CONFIG_LV_GRAD_CACHE_DEF_SIZE=0
CONFIG_LV_IMG_CACHE_DEF_SIZE=0
CONFIG_LV_INDEV_DEF_READ_PERIOD=30
CONFIG_LV_LABEL_LONG_TXT_HINT=y
CONFIG_LV_LABEL_TEXT_SELECTION=y
CONFIG_LV_MEM_BUF_MAX_NUM=16
CONFIG_LV_MEM_CUSTOM=y
CONFIG_LV_MEM_CUSTOM_INCLUDE="stdlib.h"
CONFIG_LV_SHADOW_CACHE_SIZE=0
CONFIG_LV_TXT_BREAK_CHARS=" ,.;:-_"
CONFIG_LV_TXT_COLOR_CMD="#"
CONFIG_LV_TXT_ENC_UTF8=y
CONFIG_LV_TXT_LINE_BREAK_LONG_LEN=0
CONFIG_LV_USE_LABEL=y
CONFIG_LV_USE_USER_DATA=y
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_Z_BUFFER_ALLOC_STATIC=y
CONFIG_LV_Z_DPI=148
CONFIG_LV_Z_MEM_POOL_MAX_SIZE=8192
CONFIG_LV_Z_MEM_POOL_MIN_SIZE=32
CONFIG_LV_Z_MEM_POOL_NUMBER_BLOCKS=1
CONFIG_LV_Z_MEM_POOL_SYS_HEAP=y
CONFIG_LV_Z_POINTER_KSCAN_MSGQ_COUNT=10
CONFIG_LV_Z_VDB_SIZE=64
CONFIG_MAIN_STACK_SIZE=1024
CONFIG_MAIN_THREAD_PRIORITY=0
CONFIG_MAX_TIMER_COUNT=5
CONFIG_MINIMAL_LIBC=y
CONFIG_MINIMAL_LIBC_CALLOC=y
CONFIG_MINIMAL_LIBC_MALLOC=y
CONFIG_MINIMAL_LIBC_MALLOC_ARENA_SIZE=0
CONFIG_MINIMAL_LIBC_NON_REENTRANT_FUNCTIONS=y
CONFIG_MINIMAL_LIBC_OPTIMIZE_STRING_FOR_SIZE=y
CONFIG_MINIMAL_LIBC_REALLOCARRAY=y
CONFIG_MINIMAL_LIBC_TIME=y
CONFIG_MPU=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT=y
CONFIG_MP_NUM_CPUS=1
CONFIG_MULTITHREADING=y
CONFIG_NEED_LIBC_MEM_PARTITION=y
CONFIG_NET_BUF=y
CONFIG_NET_BUF_USER_DATA_SIZE=0
CONFIG_NRFX_CLOCK=y
CONFIG_NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED=y
CONFIG_NRFX_GPIOTE=y
CONFIG_NRFX_GPIOTE_NUM_OF_EVT_HANDLERS=1
CONFIG_NRFX_NVMC=y
CONFIG_NRFX_POWER=y
CONFIG_NRFX_TWI0=y
CONFIG_NRFX_TWI=y
CONFIG_NRFX_USBD=y
CONFIG_NRF_802154_SOURCE_HAL_NORDIC=y
CONFIG_NRF_ACL_FLASH_REGION_SIZE=0
CONFIG_NRF_APPROTECT_USE_UICR=y
CONFIG_NRF_ENABLE_ICACHE=y
CONFIG_NRF_HW_RTC0_RESERVED=y
CONFIG_NRF_HW_RTC1_RESERVED=y
CONFIG_NRF_HW_TIMER0_RESERVED=y
CONFIG_NRF_RTC_TIMER=y
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=0
CONFIG_NRF_SOC_SECURE_SUPPORTED=y
CONFIG_NULL_POINTER_EXCEPTION_DETECTION_NONE=y
CONFIG_NUM_COOP_PRIORITIES=16
CONFIG_NUM_IRQS=48
CONFIG_NUM_MBOX_ASYNC_MSGS=10
CONFIG_NUM_METAIRQ_PRIORITIES=0
CONFIG_NUM_PREEMPT_PRIORITIES=15
CONFIG_NVS=y
CONFIG_OUTPUT_DISASSEMBLY=y
CONFIG_OUTPUT_PRINT_MEMORY_USAGE=y
CONFIG_OUTPUT_STAT=y
CONFIG_PICOLIBC_SUPPORTED=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_NRF=y
CONFIG_PINCTRL_STORE_REG=y
CONFIG_PLATFORM_SPECIFIC_INIT=y
CONFIG_PM=y
CONFIG_PM_DEVICE=y
CONFIG_PM_DEVICE_POWER_DOMAIN=y
CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC=y
CONFIG_PM_DEVICE_POWER_DOMAIN_DYNAMIC_NUM=2
CONFIG_PM_DEVICE_RUNTIME=y
CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE=y
CONFIG_PM_POLICY_DEFAULT=y
CONFIG_POLL=y
CONFIG_POSIX_MAX_FDS=4
CONFIG_POWER_DOMAIN=y
CONFIG_POWER_DOMAIN_GPIO=y
CONFIG_PREEMPT_ENABLED=y
CONFIG_PRINTK=y
CONFIG_PRIORITY_CEILING=-127
CONFIG_PRIVILEGED_STACK_SIZE=1024
CONFIG_REBOOT=y
CONFIG_RISCV_MACHINE_TIMER_MIN_DELAY=100
CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER=0
CONFIG_ROM_START_OFFSET=0
CONFIG_RUNTIME_ERROR_CHECKS=y
CONFIG_SCHED_DUMB=y
CONFIG_SENSOR=y
CONFIG_SENSOR_INIT_PRIORITY=90
CONFIG_SETTINGS=y
CONFIG_SETTINGS_DYNAMIC_HANDLERS=y
CONFIG_SETTINGS_NVS=y
CONFIG_SETTINGS_NVS_SECTOR_COUNT=8
CONFIG_SETTINGS_NVS_SECTOR_SIZE_MULT=1
CONFIG_SHIELD_CORNE_LEFT=y
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_SOC="nRF52840_QIAA"
CONFIG_SOC_COMPATIBLE_NRF52X=y
CONFIG_SOC_COMPATIBLE_NRF=y
CONFIG_SOC_DCDC_NRF52X=y
CONFIG_SOC_FAMILY="nordic_nrf"
CONFIG_SOC_FAMILY_NRF=y
CONFIG_SOC_FLASH_NRF=y
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
CONFIG_SOC_HAS_TIMING_FUNCTIONS=y
CONFIG_SOC_NRF52840=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_SOC_SERIES="nrf52"
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SRAM_BASE_ADDRESS=0x20000000
CONFIG_SRAM_OFFSET=0
CONFIG_SRAM_REGION_PERMISSIONS=y
CONFIG_SRAM_SIZE=256
CONFIG_SSD1306=y
CONFIG_SSD1306_DEFAULT=y
CONFIG_SSD1306_DEFAULT_CONTRAST=128
CONFIG_SSD1306_REVERSE_MODE=y
CONFIG_STACK_ALIGN_DOUBLE_WORD=y
CONFIG_STACK_POINTER_RANDOM=0
CONFIG_SUPPORT_MINIMAL_LIBC=y
CONFIG_SWAP_NONATOMIC=y
CONFIG_SYSTEM_CLOCK_INIT_PRIORITY=0
CONFIG_SYSTEM_CLOCK_WAIT_FOR_STABILITY=y
CONFIG_SYSTEM_WORKQUEUE_PRIORITY=-1
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_SYS_CLOCK_EXISTS=y
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=32768
CONFIG_SYS_CLOCK_MAX_TIMEOUT_DAYS=365
CONFIG_SYS_CLOCK_TICKS_PER_SEC=32768
CONFIG_SYS_HEAP_ALLOC_LOOPS=3
CONFIG_SYS_HEAP_SMALL_ONLY=y
CONFIG_TEMP_NRF5=y
CONFIG_THREAD_STACK_INFO=y
CONFIG_TICKLESS_CAPABLE=y
CONFIG_TICKLESS_KERNEL=y
CONFIG_TIMEOUT_64BIT=y
CONFIG_TIMESLICE_PRIORITY=0
CONFIG_TIMESLICE_SIZE=0
CONFIG_TIMESLICING=y
CONFIG_TINYCRYPT=y
CONFIG_TINYCRYPT_AES=y
CONFIG_TINYCRYPT_AES_CMAC=y
CONFIG_TINYCRYPT_ECC_DH=y
CONFIG_TMP112_FULL_SCALE_RUNTIME=y
CONFIG_TMP112_SAMPLING_FREQUENCY_RUNTIME=y
CONFIG_TOOLCHAIN_HAS_BUILTIN_FFS=y
CONFIG_TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE=y
CONFIG_TOOLCHAIN_ZEPHYR_0_15=y
CONFIG_TOOLCHAIN_ZEPHYR_SUPPORTS_THREAD_LOCAL_STORAGE=y
CONFIG_USB_DEVICE_DRIVER=y
CONFIG_USB_DEVICE_HID=y
CONFIG_USB_DEVICE_MANUFACTURER="ZMK Project"
CONFIG_USB_DEVICE_PID=0x615E
CONFIG_USB_DEVICE_PRODUCT="Korne"
CONFIG_USB_DEVICE_REMOTE_WAKEUP=y
CONFIG_USB_DEVICE_SN="0123456789ABCDEF"
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_VID=0x1D50
CONFIG_USB_HID_DEVICE_COUNT=1
CONFIG_USB_HID_DEVICE_NAME="HID"
CONFIG_USB_HID_POLL_INTERVAL_MS=1
CONFIG_USB_HID_REPORTS=1
CONFIG_USB_MAX_ALT_SETTING=8
CONFIG_USB_MAX_NUM_TRANSFERS=4
CONFIG_USB_MAX_POWER=50
CONFIG_USB_NRFX=y
CONFIG_USB_NRFX_ATTACHED_EVENT_DELAY=0
CONFIG_USB_NRFX_EVT_QUEUE_SIZE=32
CONFIG_USB_NRFX_WORK_QUEUE_STACK_SIZE=1024
CONFIG_USB_NUMOF_EP_WRITE_RETRIES=10
CONFIG_USB_PID_BLE_HCI_H4_SAMPLE=0x000C
CONFIG_USB_PID_BLE_HCI_SAMPLE=0x000B
CONFIG_USB_PID_CDC_ACM_COMPOSITE_SAMPLE=0x0002
CONFIG_USB_PID_CDC_ACM_SAMPLE=0x0001
CONFIG_USB_PID_CONSOLE_SAMPLE=0x0004
CONFIG_USB_PID_DFU_SAMPLE=0x0005
CONFIG_USB_PID_HID_CDC_SAMPLE=0x0003
CONFIG_USB_PID_HID_MOUSE_SAMPLE=0x0007
CONFIG_USB_PID_HID_SAMPLE=0x0006
CONFIG_USB_PID_MASS_SAMPLE=0x0008
CONFIG_USB_PID_TESTUSB_SAMPLE=0x0009
CONFIG_USB_PID_WEBUSB_SAMPLE=0x000A
CONFIG_USB_PID_WPANUSB_SAMPLE=0x000D
CONFIG_USB_REQUEST_BUFFER_SIZE=128
CONFIG_USB_SELF_POWERED=y
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_WAITQ_DUMB=y
CONFIG_WARN_DEPRECATED=y
CONFIG_XIP=y
CONFIG_XOSHIRO_RANDOM_GENERATOR=y
CONFIG_ZEPHYR_CANOPENNODE_MODULE=y
CONFIG_ZEPHYR_CHRE_MODULE=y
CONFIG_ZEPHYR_DRIVERS_MODULE=y
CONFIG_ZEPHYR_HAL_ESPRESSIF_MODULE=y
CONFIG_ZEPHYR_HAL_GIGADEVICE_MODULE=y
CONFIG_ZEPHYR_HAL_NORDIC_MODULE=y
CONFIG_ZEPHYR_HAL_RPI_PICO_MODULE=y
CONFIG_ZEPHYR_HAL_TELINK_MODULE=y
CONFIG_ZEPHYR_LIBLC3_MODULE=y
CONFIG_ZEPHYR_LITTLEFS_MODULE=y
CONFIG_ZEPHYR_LVGL_MODULE=y
CONFIG_ZEPHYR_LZ4_MODULE=y
CONFIG_ZEPHYR_MBEDTLS_MODULE=y
CONFIG_ZEPHYR_NANOPB_MODULE=y
CONFIG_ZEPHYR_PICOLIBC_MODULE=y
CONFIG_ZEPHYR_TFLITE_MICRO_MODULE=y
CONFIG_ZEPHYR_TRACERECORDER_MODULE=y
CONFIG_ZEPHYR_TRUSTED_FIRMWARE_A_MODULE=y
CONFIG_ZEPHYR_UOSCORE_UEDHOC_MODULE=y
CONFIG_ZEPHYR_ZCBOR_MODULE=y
CONFIG_ZEPHYR_ZSCILIB_MODULE=y
CONFIG_ZMK_BATTERY=y
CONFIG_ZMK_BATTERY_NRF_VDDH=y
CONFIG_ZMK_BATTERY_REPORT_INTERVAL=60
CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=64
CONFIG_ZMK_BLE=y
CONFIG_ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE=5
CONFIG_ZMK_BLE_INIT_PRIORITY=50
CONFIG_ZMK_BLE_KEYBOARD_REPORT_QUEUE_SIZE=20
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_QUEUE_SIZE=5
CONFIG_ZMK_BLE_SPLIT_CENTRAL_SPLIT_RUN_STACK_SIZE=512
CONFIG_ZMK_BLE_THREAD_PRIORITY=5
CONFIG_ZMK_BLE_THREAD_STACK_SIZE=512
CONFIG_ZMK_COMBO_MAX_COMBOS_PER_KEY=5
CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO=4
CONFIG_ZMK_COMBO_MAX_PRESSED_COMBOS=4
CONFIG_ZMK_DISPLAY=y
CONFIG_ZMK_DISPLAY_BLANK_ON_IDLE=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_PRIORITY=5
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE=6
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_FULL=y
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
CONFIG_ZMK_IDLE_TIMEOUT=30000
CONFIG_ZMK_KEYBOARD_NAME="Korne"
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=0
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
CONFIG_ZMK_KSCAN_EVENT_QUEUE_SIZE=4
CONFIG_ZMK_KSCAN_GPIO_DRIVER=y
CONFIG_ZMK_KSCAN_GPIO_MATRIX=y
CONFIG_ZMK_KSCAN_INIT_PRIORITY=40
CONFIG_ZMK_KSCAN_MATRIX_WAIT_BEFORE_INPUTS=0
CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS=0
CONFIG_ZMK_LOG_LEVEL=4
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_12=y
CONFIG_ZMK_MACRO_DEFAULT_TAP_MS=30
CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS=15
CONFIG_ZMK_POWER_DOMAINS=y
CONFIG_ZMK_POWER_DOMAINS_DYNAMIC_DEFAULT=y
CONFIG_ZMK_SETTINGS_SAVE_DEBOUNCE=60000
CONFIG_ZMK_SPLIT=y
CONFIG_ZMK_SPLIT_BLE=y
CONFIG_ZMK_SPLIT_BLE_CENTRAL_POSITION_QUEUE_SIZE=5
CONFIG_ZMK_SPLIT_ROLE_CENTRAL=y
CONFIG_ZMK_USB=y
CONFIG_ZMK_USB_INIT_PRIORITY=50
CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
CONFIG_ZMK_WIDGET_LAYER_STATUS=y
CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
CONFIG_ZMK_WIDGET_WPM_STATUS=y
CONFIG_ZMK_WPM=y

View file

@ -0,0 +1,360 @@
# 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
'&mmv MOVE_UP': Mouse ↑
'&mmv MOVE_DOWN': Mouse ↓
'&mmv MOVE_LEFT': Mouse ←
'&mmv MOVE_RIGHT': Mouse →
'&msc SCRL_UP': Scroll ↑
'&msc SCRL_DOWN': Scroll ↓
'&msc SCRL_LEFT': Scroll ←
'&msc SCRL_RIGHT': Scroll →
'&mkp MCLK': Middle Click
'&mkp MB4': Back Click
'&mkp MB5': Forward Click
qmk_keycode_map:
XXXXXXX: ''
'NO': ''
MINUS: '-'
MINS: '-'
EQUAL: '='
EQL: '='
LEFT_BRACKET: '['
LBRC: '['
RIGHT_BRACKET: ']'
RBRC: ']'
BACKSLASH: \
BSLS: \
NONUS_HASH: '#'
NUHS: '#'
SEMICOLON: ;
SCLN: ;
QUOTE: ''''
QUOT: ''''
GRAVE: '`'
GRV: '`'
COMMA: ','
COMM: ','
DOT: .
SLASH: /
SLSH: /
TILDE: '~'
TILD: '~'
EXCLAIM: '!'
EXLM: '!'
AT: '@'
HASH: '#'
DOLLAR: $
DLR: $
PERCENT: '%'
PERC: '%'
CIRCUMFLEX: ^
CIRC: ^
AMPERSAND: '&'
AMPR: '&'
ASTERISK: '*'
ASTR: '*'
LEFT_PAREN: (
LPRN: (
RIGHT_PAREN: )
RPRN: )
UNDERSCORE: _
UNDS: _
PLUS: +
LEFT_CURLY_BRACE: '{'
LCBR: '{'
RIGHT_CURLY_BRACE: '}'
RCBR: '}'
PIPE: '|'
COLON: ':'
COLN: ':'
DOUBLE_QUOTE: '"'
DQUO: '"'
DQT: '"'
LEFT_ANGLE_BRACKET: <
LABK: <
LT: <
RIGHT_ANGLE_BRACKET: '>'
RABK: '>'
GT: '>'
QUESTION: '?'
QUES: '?'
zmk_combos:
combo_tab: {align: top, o: 0.15}
combo_del: {align: top, o: 0.15}
combo_f12: {align: bottom}
combo_btclr: {align: bottom}
combo_play: {align: right}
combo_capswd: {draw_separate: true}
combo_semi: {draw_separate: true}
combo_grave: {draw_separate: true}
combo_lpar: {draw_separate: true}
combo_rpar: {draw_separate: true}
combo_lbkt: {draw_separate: true}
combo_rbkt: {draw_separate: true}
combo_tab: {draw_separate: true}
combo_del: {draw_separate: true}
combo_esc: {draw_separate: true}
combo_ret: {draw_separate: true}
combo_lock: {draw_separate: true}
combo_bslh: {draw_separate: true}
combo_slsh: {draw_separate: true}
zmk_keycode_map:
# custom mappings
C_VOL_UP: Vol Up
C_VOL_DN: Vol Down
C_AL_CALC: Calc
# C_PP: Play Pause
LCTRL: Ctrl
RCTRL: Ctrl
LALT: Alt
RALT: Alt
LGUI: Gui
RGUI: Gui
LSHFT: Shift
RSHFT: Shift
ESC: Esc
SPACE:
BSPC:
RET:
TAB:
DEL:
PG_UP: Page Up
PG_DN: Page Down
INS: Insert
HOME: Home
END: End
CAPS: Caps Lock
PSCRN: Print Scrn
PAUSE_BREAK: Pause Break
UP:
DOWN:
LEFT:
RIGHT:
C_PP:
C_NEXT: ⏭️
C_PREV: ⏮️
# defaults
# AMPERSAND: '&'
# AMPS: '&'
APOS: "'"
APOSTROPHE: "'"
ASTERISK: '*'
ASTRK: '*'
AT: '@'
AT_SIGN: '@'
BACKSLASH: \
BSLH: \
CARET: ^
COLON: ':'
COMMA: ','
DLLR: $
DOLLAR: $
DOT: .
DOUBLE_QUOTES: '"'
DQT: '"'
EQUAL: '='
EXCL: '!'
EXCLAMATION: '!'
FSLH: /
GRAVE: '`'
GREATER_THAN: '>'
GT: '>'
HASH: '#'
LBKT: '['
LBRC: '{'
LEFT_BRACE: '{'
LEFT_BRACKET: '['
LEFT_PARENTHESIS: (
LESS_THAN: <
LPAR: (
LT: <
MINUS: '-'
NON_US_BACKSLASH: \
NON_US_BSLH: '|'
NON_US_HASH: '#'
NUHS: '#'
PERCENT: '%'
PERIOD: .
PIPE: '|'
PIPE2: '|'
PLUS: +
POUND: '#'
PRCNT: '%'
QMARK: '?'
QUESTION: '?'
RBKT: ']'
RBRC: '}'
RIGHT_BRACE: '}'
RIGHT_BRACKET: ']'
RIGHT_PARENTHESIS: )
RPAR: )
SEMI: ;
SEMICOLON: ;
SINGLE_QUOTE: ''''
SLASH: /
SQT: ''''
STAR: '*'
TILDE: '~'
TILDE2: '~'
UNDER: _
UNDERSCORE: _

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# 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
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# 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
### OLED Display
CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# 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
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# 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
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# 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
# =========================================
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
CONFIG_ZMK_RGB_UNDERGLOW=y
CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# 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
### OLED Display
CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
CONFIG_ZMK_WIDGET_WPM_STATUS=n
CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# me da error, probando a ver si se quita el error
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
# ========================================
# FileName: corne.conf
# 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
# ╔═╦═╦═╗
# ╔════╗ ║║║║║╔╝
# ║╔╗╔╗║ ║║║║║╚╗
# ╚╝║║╚╝ ║╠═╩╩═╝
# ║╠═╦═╣╚╦═╦╦═╦╗╔═╦═╦╦╗
# ║║╩╣═╣║║║║║╬║╚╣╬║╬║║║
# ╚╩═╩═╩╩╩╩═╩═╩═╩═╬╗╠╗║
# ╚═╩═╝
# Copyright (c) 2020 The ZMK Contributors
# SPDX-License-Identifier: MIT
# =========================================
# on config_zmk.h file enable/disable the following options, if you want to
# use CONFIG_ZMK_MOUSE=y, CONFIG_ZMK_RGB_UNDERGLOW=y, CONFIG_ZMK_RGB_UNDERGLOW=y
# mouse config, 1 = enable, 0 = disable, default = 1
# 2 = enable, but with rgb matrix
# #define MC_TECHNOLOGY_MOUSE_ENABLE 1
# rgb matrix config, 1 = enable, 0 = disable, default = 0
# #define MC_TECHNOLOGY_RGB_ENABLE 0
# define macros on for .dtsi file 1 = enable, 0 = disable default = 1
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
# CONFIG_ZMK_RGB_UNDERGLOW=y
# CONFIG_WS2812_STRIP=y
# apaga si no se usa el teclado
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# 0 Solid color 1 Breathe 2 Spectrum 3 Swirl
# CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=3
# nivel de brillo en porcentaje, el valor por defecto es 10 por ciento
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_STEP=1
# Turn off RGB underglow when keyboard goes into idle state
# CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
# # Hue step in degrees (0-359) used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_STEP=30
# # Brightness step in percent used by RGB actions default 10
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_STEP=2
# CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=240
# CONFIG_ZMK_RGB_UNDERGLOW_SAT_START=10
# CONFIG_ZMK_RGB_UNDERGLOW_BRT_START=15
# 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
### OLED Display
# CONFIG_ZMK_DISPLAY=y
# esto creo que ya no es necesario
# CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
# CONFIG_ZMK_DISPLAY_STATUS_SCREEN_BUILT_IN=y
### WIDGET SETTINGS compatible SOLO con OLED
# No Widget configurations added since nice!view has its own custom widgets
# activar solo estos dos widgets
# CONFIG_ZMK_WIDGET_WPM_STATUS=n
# CONFIG_ZMK_WIDGET_BATTERY_STATUS_SHOW_PERCENTAGE=y
# CONFIG_ZMK_WIDGET_LAYER_STATUS=y
# CONFIG_ZMK_WIDGET_BATTERY_STATUS=y
# CONFIG_ZMK_WIDGET_OUTPUT_STATUS=y
### HID para nice!view ePaperDisplay
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,105 +0,0 @@
/* ========================================
FileName: config_zmk.h
Date: 15:17 23.September.2022
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: define config for the wireless corne keyboard
Use: in your keymap file, include this file
#include "config_zmk.h"
===========================================
Copyright 2023 Marcos Ivan Chow Castro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// mouse config, 1 = enable, 0 = disable, default = 1
#define MC_TECHNOLOGY_MOUSE_ENABLE 1
// layers
#define DEFAULT 0
#define NUMBER 1
#define SYMBOL 2
#define FUNCTION 3
#define MEDIA 4
#define MOUSE 5
// esta capa la uso por la compatibilidad entre mac, windows y linux
// a veces los caracteres no son los mismos
#define LX_ 6
#define LOCK 7
#define NAV_LEFT &mt HOME LEFT // tap: left | long-tap: beginning of line
#define NAV_RIGHT &mt END RIGHT // tap: right | long-tap: end of line
#define NAV_UP &mt LC(HOME) UP // tap: up | long-tap: beginning of document
#define NAV_DOWN \
&mt LC(END) DOWN // tap: down | long-tap: end of document
#define NAV_BSPC \
&mt LC(BSPC) BSPC // tap: bspc | long-tap: delete word backward
#define NAV_DEL &mt LC(DEL) DEL // tap: del | long-tap: delete word forward
// combinadas para optimizar espacio
#define MEDIA_ESC &lt MEDIA ESC
#define MOUSE_TAB &lt MOUSE TAB
#define NUMBER_SPACE &lt NUMBER SPACE
#define SYMBOL_RGUI &mo SYMBOL // &lt SYMBOL RGUI
#define FUNCTION_RALT &mo FUNCTION // &lt FUNCTION RALT
// default_layer
#define LSHFT_COMMA &mt LSHFT COMMA
// function_layer
#define SPELL &kp LC(LG(D))
#define TRADUCT &kp LS(LA(T))
#define SNIPPET &kp LA(LG(G))
#define CLIPBRD &kp LA(LG(V))
#define EMOJI &kp LC(LG(SPACE))
#define TASKM &kp LC(LA(DEL)) // C-A-DEL
// media_layer
#define SC_FLOW &kp LS(LG(NUMBER_1)) // <S-D-1> ScrenFlow app for MacOS
#define TXTSNIP &kp LS(LG(NUMBER_2)) // <S-D-2> TextSniper app for MacOS
#define SC_SHOT \
&kp LS(LG(NUMBER_3)) // <S-D-3> ScrenShot for all system see &kp PRINTSCREEN
// for MacOS
#define SC_SPSF \
&kp LS(LG(NUMBER_4)) // <S-D-4> Save picture of screen as a file for MacOS
#define SC_RE \
&kp LS(LG(NUMBER_5)) // <S-D-5> Screenshot and recording options for MacOS
#define OP_TERM \
&kp LC(LG(LA(SLASH))) // open terminal iTerm2 in current directory for MacOS
#define POS1 \
&kp LA(LG(NUMBER_1)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS2 \
&kp LA(LG(NUMBER_2)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS3 \
&kp LA(LG(NUMBER_3)) // positions of current app with cmacro2iner integration
// for MacOS
#define POS4 \
&kp LA(LG(NUMBER_4)) // positions of current app with cmacro2iner integration
// for MacOS
// define blueth
#define BT(n) BT_SEL n
// vim: set ft=c fdm=marker:

View file

@ -28,29 +28,31 @@
# #define MC_TECHNOLOGY_MACROS_ENABLE 1
### Keyboard name
# 1 nice
CONFIG_ZMK_KEYBOARD_NAME="Nice Corne"
# 1 puchi
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne"
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne View"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne View"
# CONFIG_ZMK_KEYBOARD_NAME="Nice Corne Oled"
# CONFIG_ZMK_KEYBOARD_NAME="Puchi Corne Oled"
### Boost Bluetooth TX power, also make Bluetooth stronger
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
# Tune bluetooth profiles for quick select
# CONFIG_BT_MAX_CONN=3
### POWER OPTIONS
CONFIG_ZMK_EXT_POWER=y
CONFIG_ZMK_SLEEP=y
# 2 puchi 15 min (15*60*1000ms)
# CONFIG_ZMK_EXT_POWER=y
# CONFIG_ZMK_SLEEP=y
# 15 min (15*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=900000
# 2 nice 30 min (30*60*1000ms)
# 1 min Número de milisegundos de inactividad antes de entrar en estado inactivo
# CONFIG_ZMK_IDLE_TIMEOUT=60000
# 30 min (30*60*1000ms)
# CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=1800000
# CONFIG_ZMK_IDLE_TIMEOUT=120000
# Disable external power when not connected to USB
# CONFIG_ZMK_EXT_POWER_USB_ONLY=y
### MOUSE
CONFIG_ZMK_MOUSE=y
# CONFIG_ZMK_MOUSE=y
### RGB UNDERGLOW
# uncomment to enable RGB Underglow or backlight
@ -98,8 +100,8 @@ CONFIG_ZMK_MOUSE=y
# Enable eager debouncing
# "Eager Debouncing"
# Trying to lower the input lag.
CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
# CONFIG_ZMK_KSCAN_DEBOUNCE_PRESS_MS=1
# CONFIG_ZMK_KSCAN_DEBOUNCE_RELEASE_MS=5
### Improves compatibility with iPad
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
# CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y

View file

@ -1,228 +1,61 @@
/* ========================================
FileName: corne.keymap
Date: 15:17 23.September.2022
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: keymap for the wireless corne keyboard
Copyright (c) 2020 The ZMK Contributors
SPDX-License-Identifier: MIT
========================================= */
// ### include {{{
/*
* 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/outputs.h>
#include <dt-bindings/zmk/ext_power.h>
#include <dt-bindings/led/led.h>
#include <dt-bindings/zmk/backlight.h>
#include <dt-bindings/zmk/rgb.h>
#include <dt-bindings/zmk/reset.h>
#include "keymap_german_mac_iso_zmk.h"
#include "keypos_42keys.h"
#include "config_zmk.h"
#include "mouse.dtsi"
&led_strip {
chain-length = <27>;
};
// }}}
#include <dt-bindings/zmk/keys.h>
#include <dt-bindings/zmk/mouse.h>
/ {
// ### macros {{{
macros {
#include "macros.dtsi"
};
// }}}
// ### combos {{{
combos {
compatible = "zmk,combos";
unlock {
bindings = <&to DEFAULT>;
key-positions = <LT5 LH0 RH0 RT5>;
layers = <LOCK>;
};
lock {
bindings = <&to LOCK>;
key-positions = <LT5 RH0>;
layers = <LX_>;
};
};
// }}}
// ### conditional_layers {{{
conditional_layers {
compatible = "zmk,conditional-layers";
tri_layer {
if-layers = <SYMBOL FUNCTION>;
then-layer = <LX_>;
};
};
//}}}
keymap {
compatible = "zmk,keymap";
// ### default_layer {{{
default_layer {
/*.------------------------------------------------. .-------------------------------------------------.
|LT4 ESC | Q | W | E | R | T | | Z | U | I | O | P | BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|LT5 TAB | A | S | D | F | G | | H | J | K | L | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | Y | X | C | V | B | | N | M |LSFT , | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | LT1 SPACE | LT2 CMD | LT3 RALT |
'--------------------------------' '----------------------------------'*/
label = "Marcos";
// -----------------------------------------------------------------------------------------
// | 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 = <
MEDIA_ESC DE_Q DE_W DE_E DE_R DE_T DE_Z DE_U DE_I DE_O DE_P DE_BSPC
MOUSE_TAB DE_A DE_S DE_D DE_F DE_G DE_H DE_J DE_K DE_L DE_UP DE_RET
DE_LSHFT DE_Y DE_X DE_C DE_V DE_B DE_N DE_M LSHFT_COMMA DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_RALT NUMBER_SPACE SYMBOL_RGUI FUNCTION_RALT
&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
>;
};
// }}}
// ### number_layer {{{
number_layer {
/*.-------------------------------------------------. .-------------------------------------------------.
| 0 | 1 | 2 | 3 | - | + | | ß | Ü | Ä | Ö | Ñ |BACKSPC |
|---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|CAPS_LOCK| 4 | 5 | 6 | / | * | | # | ~ | ? | @ | UP | ENTER |
|---------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| SHIFT | 7 | 8 | 9 | % | = | | . | ´ | ` | LEFT | DOWN | RIGHT |
'----------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | SPACE | | | LSFT | ALTGR |
'--------------------------------' '--------------------------------'*/
label = "NUMBER";
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 = <
DE_0 DE_1 DE_2 DE_3 DE_MINS DE_PLUS DE_SS DE_UDIA DE_ADIA DE_ODIA &ene_small DE_BSPC
DE_CAPS DE_4 DE_5 DE_6 DE_SLSH DE_ASTR DE_HASH DE_TILD DE_QUES DE_AT DE_UP DE_RET
DE_LSHFT DE_7 DE_8 DE_9 DE_PERC DE_EQL DE_DOT DE_ACUT DE_GRV DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_SPACE XXX DE_LSHFT DE_RALT
&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
>;
};
// }}}
// ### symbol_layer {{{
symbol_layer {
/*.------------------------------------------------. TODO: .-------------------------------------------------.
| $ | ( | ) | [ | ] | & | | ` | ' | ´ | " | |BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| % | { | } | ^ |PAGE_UP| # | | \ | | | / | & | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | SPACE | | ENTER | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "SYMBOL";
raise_layer {
// -----------------------------------------------------------------------------------------
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BKSP |
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
// | GUI | | SPC | | ENT | | ALT |
bindings = <
DE_DLR DE_LPRN DE_RPRN DE_LBRC DE_RBRC DE_AMPR DE_GRV DE_QUOT DE_ACUT DE_LN_DQUO XXX DE_BSPC
DE_PERC DE_LCBR DE_RCBR DE_CARET DE_PG_UP DE_HASH DE_BSLS DE_PIPE DE_SLSH DE_AMPR DE_UP DE_RET
DE_LSHFT DE_LABK DE_RABK DE_HOME DE_PG_DN DE_END DE_TILD DE_QUOT XXX DE_LEFT DE_DOWN DE_RIGHT
DE_LCTRL DE_LGUI DE_SPACE DE_RET SYMBOL_RGUI FUNCTION_RALT
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp KP_MULTIPLY &kp LPAR &kp RPAR &kp BSPC
&kp LCTRL &trans &trans &mkp LCLK &trans &mkp RCLK &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
>;
};
// }}}
// ### function_layer {{{
function_layer {
/*.------------------------------------------------. .-------------------------------------------------.
| F1 | F2 | F3 | F4 | SPELL |TRADUCT| |DE_F13 | DE_F14|DE_F15 | DE_F16| BRI_DN| BRI_UP |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| F5 | F6 | F7 | F8 | \ |ALFRED | |C-A-DEL|DE_F19 |DE_F20 |CLR_LIN|PAGE_UP| |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| F9 | F10 | F11 | F12 |ALFRED |EMOJI | |L_SHIFT|L_SHIFT|R_SHIFT| HOME |PAGE_DO| END |
'----------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | TAB | ´ | CTRL |
'--------------------------------' '--------------------------------'
LCTL(LGUI(KC_D)), LCTL(LGUI(KC_SPC))*/
label = "FUNCTION";
bindings = <
DE_F1 DE_F2 DE_F3 DE_F4 SPELL TRADUCT &macro6 &macro5 &macro8 &macro2 DE_BRI_DN DE_BRI_UP
DE_F5 DE_F6 DE_F7 DE_F8 DE_BSLS SNIPPET TASKM &macro1 &macro3 &macro4 DE_PG_UP &macro9
DE_F9 DE_F10 DE_F11 DE_F12 CLIPBRD EMOJI DE_LSHFT DE_LSHFT DE_RSHFT DE_HOME DE_PG_DN DE_END
DE_LCTRL DE_LGUI DE_LALT DE_TAB DE_ACUT DE_LCTRL
>;
};
// }}}
// ### media_layer {{{
media_layer {
/*.------------------------------------------------. .-------------------------------------------------.
| |SC_FLOW|TXTSNIP|SC_SHOT|OP_TERM| | |POS1 |POS2 |LANG_1 |LANG_2 | STOP | DELETE |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|bootlder|SC_SPSF|SC_RE | | | | |POS3 |POS4 |LANG_3 |SHUFFLE|VOL_UP |PLAY/PAUS|
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|reset | | | | | | | | | MUTE | PREV |VOL_DOW| NEXT |
'---------------------------------------------------------| |----------------------------------------------------------'
| CTRL | CMD | ALT | | SPACE | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "MEDIA";
bindings = <
XXX SC_FLOW TXTSNIP SC_SHOT OP_TERM XXX POS1 POS2 DE_LANG1 DE_LANG2 DE_STOP DE_DEL
&bootloader SC_SPSF SC_RE XXX XXX XXX POS3 POS4 DE_LANG3 DE_SHUFFLE DE_VOL_UP DE_PLAY
&sys_reset XXX XXX XXX XXX XXX &ene_small &ene_big DE_MUTE DE_PREV DE_VOL_DN DE_NEXT
DE_LCTRL DE_LGUI DE_LALT DE_SPACE DE_RALT DE_LCTRL
>;
};
// }}}
// ### mouse_layer: mouse {{{
mouse_layer {
/*.------------------------------------------------. .-------------------------------------------------.
|WH_LEFT |WH_RIGH| |OUT_USB|OUT_BLE|OUT_TOG| | BRD- | BRI+ | SPD- | SPI+ |WH_DOWN| WH_UP |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| |CLICK_1|CLICK_2|CLICK_3|BT_PRV | BT_NXT| | HUD- | HUI+ | |CLICK_1| UP |CLICK_2 |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|BT_CLR |BT_0 |BT_1 |BT_2 |BT_3 |BT_4 | | SAD- | SAI+ | RESET | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
|EP_OFF | EP_ON| EP_TOG | | EFF- | EFR+ | RGB_TOG |
'--------------------------------' '--------------------------------'*/
label = "MOUSE";
bindings = <
SCROLL_LEFT SCROLL_RIGHT XXX &out OUT_USB &out OUT_BLE &out OUT_TOG &rgb_ug RGB_BRD &rgb_ug RGB_BRI &rgb_ug RGB_SPD &rgb_ug RGB_SPI SCROLL_DOWN SCROLL_UP
XXX CLICK_LEFT CLICK_RIGHT CLICK_MIDDLE &bt BT_PRV &bt BT_NXT &rgb_ug RGB_HUD &rgb_ug RGB_HUI &rgb_ug RGB_COLOR_HSB(0,0,100) CLICK_LEFT MOVE_UP CLICK_RIGHT
&bt BT_CLR &bt BT(0) &bt BT(1) &bt BT(2) &bt BT(3) &bt BT(4) &rgb_ug RGB_SAD &rgb_ug RGB_SAI &rgb_ug RGB_COLOR_HSB(224,100,100) MOVE_LEFT MOVE_DOWN MOVE_RIGHT
&ext_power EP_OFF &ext_power EP_ON &ext_power EP_TOG &rgb_ug RGB_EFF &rgb_ug RGB_EFR &rgb_ug RGB_TOG
>;
};
// }}}
// ### linux_symbol {{{
linux_symbol {
/*.------------------------------------------------. TODO: .-------------------------------------------------.
| $ | ( | ) | [ | ] | & | | ` | ' | ´ |bootldr| reset |BACKSPC |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
| % | { | } | ^ |PAGE_UP| # | | \ | | | / | & | UP | ENTER |
|--------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+---------|
|SHIFT | < | > | HOME |PAGE_DO| END | | ~ | ' | @ | LEFT | DOWN | RIGHT |
'---------------------------------------------------------| |----------------------------------------------------------'
DE_LN_DQUO |DE_F13 | DE_F14 | DE_F15 | | SPACE | ALTGR | CTRL |
'--------------------------------' '--------------------------------'*/
label = "LX_";
bindings = <
DE_DLR DE_LN_LPRN DE_LN_RPRN DE_LN_LBRC DE_LN_RBRC DE_LN_AMPS DE_GRV DE_QUOT DE_ACUT &bootloader &sys_reset DE_BSPC
DE_PERC DE_LN_LCBR DE_LN_RCBR DE_LN_CARET DE_PG_UP DE_HASH DE_LN_BSLH DE_LN_PIPE DE_LN_FSLH DE_LN_AMPS DE_UP DE_RET
DE_LSHFT DE_LN_LABK DE_LN_RABK DE_HOME DE_PG_DN DE_END DE_LN_TILDE DE_QUOT DE_LN_AT NAV_LEFT DE_DOWN NAV_RIGHT
&macro7 &macro5 &macro8 DE_SPACE DE_RALT DE_LCTRL
>;
};
// }}}
// ### lock {{{
lock {
label = "Lock";
bindings = <
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none &none &none &none &none &none &none
&none &none &none &none &none &none
>;
};
//}}}
};
};
// vim: filetype=dts fdm=marker:

View file

@ -1,62 +0,0 @@
/* 42 KEY MATRIX / LAYOUT MAPPING
0 1 2 3 4 5 6 7 8 9 10 11 LT5 LT4 LT3 LT2 LT1 LT0 RT0 RT1 RT2 RT3 RT4 RT5
12 13 14 15 16 17 18 19 20 21 22 23 LM5 LM4 LM3 LM2 LM1 LM0 RM0 RM1 RM2 RM3 RM4 RM5
24 25 26 27 28 29 30 31 32 33 34 35 LB5 LB4 LB3 LB2 LB1 LB0 RB0 RB1 RB2 RB3 RB4 RB5
36 37 38 39 40 41 LH2 LH1 LH0 RH0 RH1 RH2
*/
#pragma once
#define LT0 5 // left-top row
#define LT1 4
#define LT2 3
#define LT3 2
#define LT4 1
#define LT5 0
#define RT0 6 // right-top row
#define RT1 7
#define RT2 8
#define RT3 9
#define RT4 10
#define RT5 11
#define LM0 17 // left-middle row
#define LM1 16
#define LM2 15
#define LM3 14
#define LM4 13
#define LM5 12
#define RM0 18 // right-middle row
#define RM1 19
#define RM2 20
#define RM3 21
#define RM4 22
#define RM5 23
#define LB0 29 // left-bottom row
#define LB1 28
#define LB2 27
#define LB3 26
#define LB4 25
#define LB5 24
#define RB0 30 // right-bottom row
#define RB1 31
#define RB2 32
#define RB3 33
#define RB4 34
#define RB5 35
#define LH0 38 // left thumb keys
#define LH1 37
#define LH2 36
#define RH0 39 // right thumb keys
#define RH1 40
#define RH2 41
// vim: filetype=dts fdm=marker:

View file

@ -1,71 +0,0 @@
/* ======================================== {{{
FileName: macros.dtsi
Date: Sun 10/11/2020 9:00:00.00
Author: Marcos Chow Castro
Email: mctechnology170318@gmail.com
GitHub: https://github.com/mctechnology17
Brief: define macros for the wireless corne keyboard
Use: in your keymap file, include this file
/ {
macros {
#include "macros.dtsi"
};
keymap {
compatible = "zmk,keymap";
default_layer {
bindings = <
...
>;
};
};
};
===========================================
Copyright 2023 Marcos Ivan Chow Castro
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}}}*/
// ### macros {{{
#define MACRO(name, keys) \
name: name##_macro { \
label = #name; \
compatible = "zmk,behavior-macro";\
#binding-cells = <0>; \
tap-ms = <1>; \
wait-ms = <1>; \
bindings = <keys>; \
};
MACRO(macro1, &kp M &kp A &kp C &kp R &kp O &kp N1)
MACRO(macro2, &kp M &kp A &kp C &kp R &kp O &kp N2)
MACRO(macro3, &kp M &kp A &kp C &kp R &kp O &kp N3)
MACRO(macro4, &kp M &kp A &kp C &kp R &kp O &kp N4)
MACRO(macro5, &kp M &kp A &kp C &kp R &kp O &kp N5)
MACRO(macro6, &kp M &kp A &kp C &kp R &kp O &kp N6)
MACRO(macro7, &kp M &kp A &kp C &kp R &kp O &kp N7)
MACRO(macro8, &kp M &kp A &kp C &kp R &kp O &kp N8)
MACRO(macro9, &kp M &kp A &kp C &kp R &kp O &kp N9)
MACRO(ene_small, DE_TILD DE_N)
MACRO(ene_big, DE_TILD &kp LS(N))
// }}}
// vim: filetype=dts fdm=marker:

View file

@ -1,68 +0,0 @@
#if MC_TECHNOLOGY_MOUSE_ENABLE == 1
# include <dt-bindings/zmk/mouse.h>
&mmv {
time-to-max-speed-ms = <1500>; // 500
acceleration-exponent=<1>;
delay-ms = <0>; // 10
};
&mwh {
time-to-max-speed-ms = <5000>; // 2000
acceleration-exponent=<1>; // 0
delay-ms = <0>; // 10
};
#undef CLICK_LEFT
#undef CLICK_RIGHT
#undef CLICK_MIDDLE
#define CLICK_LEFT &mkp LCLK
#define CLICK_RIGHT &mkp RCLK
#define CLICK_MIDDLE &mkp MCLK
#undef MOVE_UP
#undef MOVE_DOWN
#undef MOVE_LEFT
#undef MOVE_RIGHT
#define MOVE_UP &mmv MOVE_VERT(-2500)
#define MOVE_DOWN &mmv MOVE_VERT(2500)
#define MOVE_LEFT &mmv MOVE_HOR(-2500)
#define MOVE_RIGHT &mmv MOVE_HOR(2500)
#undef SCROLL_UP
#undef SCROLL_DOWN
#undef SCROLL_LEFT
#undef SCROLL_RIGHT
#define SCROLL_UP &mwh SCROLL_VERT(15)
#define SCROLL_DOWN &mwh SCROLL_VERT(-15)
#define SCROLL_LEFT &mwh SCROLL_HOR(-15)
#define SCROLL_RIGHT &mwh SCROLL_HOR(15)
#else
#undef CLICK_LEFT
#undef CLICK_RIGHT
#undef CLICK_MIDDLE
#define CLICK_LEFT &none
#define CLICK_RIGHT &none
#define CLICK_MIDDLE &none
#undef MOVE_UP
#undef MOVE_DOWN
#undef MOVE_LEFT
#undef MOVE_RIGHT
#define MOVE_UP &none
#define MOVE_DOWN &none
#define MOVE_LEFT &none
#define MOVE_RIGHT &none
#undef SCROLL_UP
#undef SCROLL_DOWN
#undef SCROLL_LEFT
#undef SCROLL_RIGHT
#define SCROLL_UP &none
#define SCROLL_DOWN &none
#define SCROLL_LEFT &none
#define SCROLL_RIGHT &none
#endif
// vim: filetype=dts fdm=marker:

View file

@ -1,14 +1,10 @@
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: urob
url-base: https://github.com/urob
- name: mctechnology17
url-base: https://github.com/mctechnology17
projects:
- name: zmk
remote: mctechnology17
remote: urob
revision: main
import: app/west.yml
self:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

747
keymap-drawer/corne.svg Normal file
View file

@ -0,0 +1,747 @@
<svg width="920" height="1048" viewBox="0 0 920 1048" class="keymap" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<style>/* inherit to force styles through use tags */
svg path {
fill: inherit;
}
/* font and background color specifications */
svg.keymap {
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
font-size: 14px;
font-kerning: normal;
text-rendering: optimizeLegibility;
fill: #24292e;
}
/* default key styling */
rect.key {
fill: #f6f8fa;
}
rect.key, rect.combo {
stroke: #c9cccf;
stroke-width: 1;
}
/* default key side styling, only used is draw_key_sides is set */
rect.side {
filter: brightness(90%);
}
/* color accent for combo boxes */
rect.combo, rect.combo-separate {
fill: #cdf;
}
/* color accent for held keys */
rect.held, rect.combo.held {
fill: #fdd;
}
/* color accent for ghost (optional) keys */
rect.ghost, rect.combo.ghost {
stroke-dasharray: 4, 4;
stroke-width: 2;
}
text {
text-anchor: middle;
dominant-baseline: middle;
}
/* styling for layer labels */
text.label {
font-weight: bold;
text-anchor: start;
stroke: white;
stroke-width: 4;
paint-order: stroke;
}
/* styling for optional footer */
text.footer {
text-anchor: end;
dominant-baseline: auto;
stroke: white;
stroke-width: 4;
paint-order: stroke;
}
/* styling for combo tap, and key hold/shifted label text */
text.combo, text.hold, text.shifted {
font-size: 11px;
}
text.hold {
text-anchor: middle;
dominant-baseline: auto;
}
text.shifted {
text-anchor: middle;
dominant-baseline: hanging;
}
text.layer-activator {
text-decoration: underline;
}
/* styling for hold/shifted label text in combo box */
text.combo.hold, text.combo.shifted {
font-size: 8px;
}
/* lighter symbol for transparent keys */
text.trans {
fill: #7b7e81;
}
/* styling for combo dendrons */
path.combo {
stroke-width: 1;
stroke: gray;
fill: none;
}
/* Start Tabler Icons Cleanup */
/* cannot use height/width with glyphs */
.icon-tabler > path {
fill: inherit;
stroke: inherit;
stroke-width: 2;
}
/* hide tabler's default box */
.icon-tabler > path[stroke="none"][fill="none"] {
visibility: hidden;
}
/* End Tabler Icons Cleanup */
/* 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;
}
</style>
<g transform="translate(40, 0)" class="layer-default">
<text x="0" y="28" class="label" id="default">default:</text>
<g transform="translate(0, 56)">
<g transform="translate(28, 49)" class="key keypos-0">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(84, 49)" class="key keypos-1">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Q</text>
</g>
<g transform="translate(140, 35)" class="key keypos-2">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">W</text>
</g>
<g transform="translate(196, 28)" class="key keypos-3">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">E</text>
</g>
<g transform="translate(252, 35)" class="key keypos-4">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">R</text>
</g>
<g transform="translate(308, 42)" class="key keypos-5">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">T</text>
</g>
<g transform="translate(532, 42)" class="key keypos-6">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Y</text>
</g>
<g transform="translate(588, 35)" class="key keypos-7">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">U</text>
</g>
<g transform="translate(644, 28)" class="key keypos-8">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">I</text>
</g>
<g transform="translate(700, 35)" class="key keypos-9">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">O</text>
</g>
<g transform="translate(756, 49)" class="key keypos-10">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">P</text>
</g>
<g transform="translate(812, 49)" class="key keypos-11">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(28, 105)" class="key keypos-12">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Ctrl</text>
</g>
<g transform="translate(84, 105)" class="key keypos-13">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">A</text>
</g>
<g transform="translate(140, 91)" class="key keypos-14">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">S</text>
</g>
<g transform="translate(196, 84)" class="key keypos-15">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">D</text>
</g>
<g transform="translate(252, 91)" class="key keypos-16">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">F</text>
</g>
<g transform="translate(308, 98)" class="key keypos-17">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">G</text>
</g>
<g transform="translate(532, 98)" class="key keypos-18">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">H</text>
</g>
<g transform="translate(588, 91)" class="key keypos-19">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">J</text>
</g>
<g transform="translate(644, 84)" class="key keypos-20">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">K</text>
</g>
<g transform="translate(700, 91)" class="key keypos-21">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">L</text>
</g>
<g transform="translate(756, 105)" class="key keypos-22">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">;</text>
</g>
<g transform="translate(812, 105)" class="key keypos-23">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">&#x27;</text>
</g>
<g transform="translate(28, 161)" class="key keypos-24">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Shift</text>
</g>
<g transform="translate(84, 161)" class="key keypos-25">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Z</text>
</g>
<g transform="translate(140, 147)" class="key keypos-26">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">X</text>
</g>
<g transform="translate(196, 140)" class="key keypos-27">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">C</text>
</g>
<g transform="translate(252, 147)" class="key keypos-28">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">V</text>
</g>
<g transform="translate(308, 154)" class="key keypos-29">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">B</text>
</g>
<g transform="translate(532, 154)" class="key keypos-30">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">N</text>
</g>
<g transform="translate(588, 147)" class="key keypos-31">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">M</text>
</g>
<g transform="translate(644, 140)" class="key keypos-32">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">,</text>
</g>
<g transform="translate(700, 147)" class="key keypos-33">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">.</text>
</g>
<g transform="translate(756, 161)" class="key keypos-34">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">/</text>
</g>
<g transform="translate(812, 161)" class="key keypos-35">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Esc</text>
</g>
<g transform="translate(224, 205)" class="key keypos-36">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Gui</text>
</g>
<g transform="translate(286, 213) rotate(15.0)" class="key keypos-37">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<a href="#lower">
<text x="0" y="0" class="key tap layer-activator">lower</text>
</a></g>
<g transform="translate(351, 224) rotate(30.0)" class="key keypos-38">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(489, 224) rotate(-30.0)" class="key keypos-39">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(554, 213) rotate(-15.0)" class="key keypos-40">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<a href="#raise">
<text x="0" y="0" class="key tap layer-activator">raise</text>
</a></g>
<g transform="translate(616, 205)" class="key keypos-41">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Alt</text>
</g>
</g>
</g>
<g transform="translate(40, 331)" class="layer-lower">
<text x="0" y="28" class="label" id="lower">lower:</text>
<g transform="translate(0, 56)">
<g transform="translate(28, 49)" class="key keypos-0">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(84, 49)" class="key keypos-1">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">1</text>
</g>
<g transform="translate(140, 35)" class="key keypos-2">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">2</text>
</g>
<g transform="translate(196, 28)" class="key keypos-3">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">3</text>
</g>
<g transform="translate(252, 35)" class="key keypos-4">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">4</text>
</g>
<g transform="translate(308, 42)" class="key keypos-5">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">5</text>
</g>
<g transform="translate(532, 42)" class="key keypos-6">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">6</text>
</g>
<g transform="translate(588, 35)" class="key keypos-7">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">7</text>
</g>
<g transform="translate(644, 28)" class="key keypos-8">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">8</text>
</g>
<g transform="translate(700, 35)" class="key keypos-9">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">9</text>
</g>
<g transform="translate(756, 49)" class="key keypos-10">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">0</text>
</g>
<g transform="translate(812, 49)" class="key keypos-11">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(28, 105)" class="key keypos-12">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">CLR</tspan>
</text>
</g>
<g transform="translate(84, 105)" class="key keypos-13">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">1</tspan>
</text>
</g>
<g transform="translate(140, 91)" class="key keypos-14">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">2</tspan>
</text>
</g>
<g transform="translate(196, 84)" class="key keypos-15">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">3</tspan>
</text>
</g>
<g transform="translate(252, 91)" class="key keypos-16">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">4</tspan>
</text>
</g>
<g transform="translate(308, 98)" class="key keypos-17">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">BT</tspan><tspan x="0" dy="1.2em">5</tspan>
</text>
</g>
<g transform="translate(532, 98)" class="key keypos-18">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(588, 91)" class="key keypos-19">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(644, 84)" class="key keypos-20">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(700, 91)" class="key keypos-21">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(756, 105)" class="key trans keypos-22">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(812, 105)" class="key trans keypos-23">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(28, 161)" class="key keypos-24">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Shift</text>
</g>
<g transform="translate(84, 161)" class="key trans keypos-25">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(140, 147)" class="key trans keypos-26">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(196, 140)" class="key trans keypos-27">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(252, 147)" class="key trans keypos-28">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(308, 154)" class="key trans keypos-29">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(532, 154)" class="key trans keypos-30">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(588, 147)" class="key trans keypos-31">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(644, 140)" class="key trans keypos-32">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(700, 147)" class="key trans keypos-33">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(756, 161)" class="key trans keypos-34">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(812, 161)" class="key trans keypos-35">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(224, 205)" class="key keypos-36">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Gui</text>
</g>
<g transform="translate(286, 213) rotate(15.0)" class="key held keypos-37">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key held"/>
</g>
<g transform="translate(351, 224) rotate(30.0)" class="key keypos-38">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(489, 224) rotate(-30.0)" class="key keypos-39">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(554, 213) rotate(-15.0)" class="key trans keypos-40">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(616, 205)" class="key keypos-41">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Alt</text>
</g>
</g>
</g>
<g transform="translate(40, 661)" class="layer-raise">
<text x="0" y="28" class="label" id="raise">raise:</text>
<g transform="translate(0, 56)">
<g transform="translate(28, 49)" class="key keypos-0">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(84, 49)" class="key keypos-1">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">!</text>
</g>
<g transform="translate(140, 35)" class="key keypos-2">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">@</text>
</g>
<g transform="translate(196, 28)" class="key keypos-3">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">#</text>
</g>
<g transform="translate(252, 35)" class="key keypos-4">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">$</text>
</g>
<g transform="translate(308, 42)" class="key keypos-5">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">%</text>
</g>
<g transform="translate(532, 42)" class="key keypos-6">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">^</text>
</g>
<g transform="translate(588, 35)" class="key keypos-7">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">AMPS</text>
</g>
<g transform="translate(644, 28)" class="key keypos-8">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em" style="font-size: 75%">KP</tspan><tspan x="0" dy="1.2em" style="font-size: 75%">MULTIPLY</tspan>
</text>
</g>
<g transform="translate(700, 35)" class="key keypos-9">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">(</text>
</g>
<g transform="translate(756, 49)" class="key keypos-10">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">)</text>
</g>
<g transform="translate(812, 49)" class="key keypos-11">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(28, 105)" class="key keypos-12">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Ctrl</text>
</g>
<g transform="translate(84, 105)" class="key trans keypos-13">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(140, 91)" class="key trans keypos-14">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(196, 84)" class="key keypos-15">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">&amp;mkp</tspan><tspan x="0" dy="1.2em">LCLK</tspan>
</text>
</g>
<g transform="translate(252, 91)" class="key trans keypos-16">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(308, 98)" class="key keypos-17">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">
<tspan x="0" dy="-0.6em">&amp;mkp</tspan><tspan x="0" dy="1.2em">RCLK</tspan>
</text>
</g>
<g transform="translate(532, 98)" class="key keypos-18">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">-</text>
</g>
<g transform="translate(588, 91)" class="key keypos-19">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">=</text>
</g>
<g transform="translate(644, 84)" class="key keypos-20">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">[</text>
</g>
<g transform="translate(700, 91)" class="key keypos-21">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">]</text>
</g>
<g transform="translate(756, 105)" class="key keypos-22">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">\</text>
</g>
<g transform="translate(812, 105)" class="key keypos-23">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">`</text>
</g>
<g transform="translate(28, 161)" class="key keypos-24">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Shift</text>
</g>
<g transform="translate(84, 161)" class="key trans keypos-25">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(140, 147)" class="key trans keypos-26">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(196, 140)" class="key trans keypos-27">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(252, 147)" class="key trans keypos-28">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(308, 154)" class="key trans keypos-29">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(532, 154)" class="key keypos-30">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">_</text>
</g>
<g transform="translate(588, 147)" class="key keypos-31">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">+</text>
</g>
<g transform="translate(644, 140)" class="key keypos-32">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">{</text>
</g>
<g transform="translate(700, 147)" class="key keypos-33">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">}</text>
</g>
<g transform="translate(756, 161)" class="key keypos-34">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">|</text>
</g>
<g transform="translate(812, 161)" class="key keypos-35">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">~</text>
</g>
<g transform="translate(224, 205)" class="key keypos-36">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Gui</text>
</g>
<g transform="translate(286, 213) rotate(15.0)" class="key trans keypos-37">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key trans"/>
<text x="0" y="0" class="key trans tap"></text>
</g>
<g transform="translate(351, 224) rotate(30.0)" class="key keypos-38">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(489, 224) rotate(-30.0)" class="key keypos-39">
<rect rx="6" ry="6" x="-26" y="-40" width="52" height="80" class="key"/>
<text x="0" y="0" class="key tap"></text>
</g>
<g transform="translate(554, 213) rotate(-15.0)" class="key held keypos-40">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key held"/>
</g>
<g transform="translate(616, 205)" class="key keypos-41">
<rect rx="6" ry="6" x="-26" y="-26" width="52" height="52" class="key"/>
<text x="0" y="0" class="key tap">Alt</text>
</g>
</g>
</g>
<text x="880.0" y="1020.0" class="footer">Keymap View: <a href="https://github.com/caksoylar/keymap-drawer">keymap-drawer</a></text></svg>

After

Width:  |  Height:  |  Size: 28 KiB

89
keymap-drawer/corne.yaml Normal file
View file

@ -0,0 +1,89 @@
layout: {qmk_keyboard: corne_rotated, qmk_layout: LAYOUT_split_3x6_3}
layers:
default: [↹, 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, ',', ., /, Esc, Gui, lower, ␣, ⏎, raise, Alt]
lower:
-
- '1'
- '2'
- '3'
- '4'
- '5'
- '6'
- '7'
- '8'
- '9'
- '0'
-
- BT CLR
- BT 1
- BT 2
- BT 3
- BT 4
- BT 5
-
-
-
-
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- Shift
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- Gui
- {type: held}
-
-
- {t: ▽, type: trans}
- Alt
raise:
-
- '!'
- '@'
- '#'
- $
- '%'
- ^
- AMPS
- KP MULTIPLY
- (
- )
-
- Ctrl
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- '&mkp LCLK'
- {t: ▽, type: trans}
- '&mkp RCLK'
- '-'
- '='
- '['
- ']'
- \
- '`'
- Shift
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- {t: ▽, type: trans}
- _
- +
- '{'
- '}'
- '|'
- '~'
- Gui
- {t: ▽, type: trans}
-
-
- {type: held}
- Alt

BIN
src/dongle.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

BIN
src/macintosh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

BIN
src/niceview_pinout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
src/pinout-pro_micro.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 KiB

BIN
src/pinout-v2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
src/puchi-ble-pinout.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB